UNPKG

@modern-js/server-core

Version:

A Progressive React Framework for modern web development.

21 lines (20 loc) 723 B
var getRuntimeEnv = function() { var _globalThis_process_release, _globalThis_process, _globalThis; if (((_globalThis = globalThis) === null || _globalThis === void 0 ? void 0 : (_globalThis_process = _globalThis.process) === null || _globalThis_process === void 0 ? void 0 : (_globalThis_process_release = _globalThis_process.release) === null || _globalThis_process_release === void 0 ? void 0 : _globalThis_process_release.name) === "node") { return "node"; } return "other"; }; var checkIsProd = function() { var env = getRuntimeEnv(); switch (env) { case "node": return process.env.NODE_ENV === "production"; default: return false; } }; export { checkIsProd, getRuntimeEnv };