Skip to content
Snippets Groups Projects
Commit 610f3ba9 authored by Alexander Rose's avatar Alexander Rose
Browse files

moved isProductionMode flag to util/debug

parent 20ad92a5
No related branches found
No related tags found
No related merge requests found
......@@ -5,14 +5,10 @@
*/
import { Task } from '../task'
import { isProductionMode } from 'mol-util/debug';
const hasPerformance = typeof performance !== 'undefined'
/**
* on node `process.env.NODE_ENV` is available, in webpack build it is automatically set
* by the DefinePlugin to the webpack `mode` value
*/
const productionMode = process.env.NODE_ENV === 'production'
const timingEnabled = hasPerformance && !productionMode
const timingEnabled = hasPerformance && !isProductionMode
export namespace UserTiming {
function startMarkName(task: Task<any>) { return `startTask${task.id}` }
......
/**
* Copyright (c) 2019 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author Alexander Rose <alexander.rose@weirdbyte.de>
*/
/**
* on node `process.env.NODE_ENV` is available, in webpack build it is automatically set
* by the DefinePlugin to the webpack `mode` value
*/
const isProductionMode = process.env.NODE_ENV === 'production'
export { isProductionMode }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment