debug.ts 597 B

12345678910111213141516171819
  1. /**
  2. * Copyright (c) 2019 mol* contributors, licensed under MIT, See LICENSE file for more info.
  3. *
  4. * @author Alexander Rose <alexander.rose@weirdbyte.de>
  5. */
  6. /**
  7. * on node `process.env.NODE_ENV` is available, in webpack build it is automatically set
  8. * by the DefinePlugin to the webpack `mode` value
  9. */
  10. const isProductionMode = process.env.NODE_ENV === 'production'
  11. /**
  12. * set to true to enable more comprehensive checks and assertions,
  13. * mostly used in `mol-gl`
  14. */
  15. const isDebugMode = process.env.DEBUG === '*' || process.env.DEBUG === 'molstar'
  16. export { isProductionMode, isDebugMode }