Match isProduction definitions
Summary: Match isProduction definition in flipper-common and flipper-server/src/index.tsx. Without it, PWA never quits after all clients disconnect because Flipper Launcher does not set NODE_ENV to production currently (changed in the next diff) Reviewed By: LukeDefeo, lblasa Differential Revision: D48265768 fbshipit-source-id: 59e4660cb57da20b606562144c47c65276999d6c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b5ed57b7d0
commit
359392a44c
@@ -13,6 +13,7 @@ declare const process: any;
|
|||||||
// this one, and one provided by the RenderHostConfig. Ideally they should be unified
|
// this one, and one provided by the RenderHostConfig. Ideally they should be unified
|
||||||
export function isProduction(): boolean {
|
export function isProduction(): boolean {
|
||||||
return (
|
return (
|
||||||
typeof process === 'undefined' || process.env.NODE_ENV === 'production'
|
typeof process === 'undefined' ||
|
||||||
|
(process.env.NODE_ENV !== 'development' && process.env.NODE_ENV !== 'test')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user