nebula/environment.js

16 lines
520 B
JavaScript
Raw Normal View History

2020-06-21 21:56:34 +08:00
/**
* @file Environment / ES module
* @module environment
2020-08-01 00:41:54 +08:00
* @author Ronger <https://github.com/ronger-x>
2020-06-21 21:56:34 +08:00
*/
export const environment = process.env
export const NODE_ENV = environment.NODE_ENV
export const isDevMode = Object.is(NODE_ENV, 'development')
export const isProdMode = Object.is(NODE_ENV, 'production')
export const isStatic = process && process.static
export const isServer = process && process.server
export const isBrowser = process && process.browser
export const isModern = process && process.modern