File tree Expand file tree Collapse file tree 3 files changed +15
-7
lines changed
Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 11const path = require ( 'path' ) ;
2- const PRODUCTION = 'production' ;
2+ const { isProduction , PRODUCTION } = require ( '../src/lib' ) ;
33
44const root = path . resolve ( __dirname , '..' ) ;
5- const environment = process . env . NODE_ENV || PRODUCTION ;
6- const isProduction = environment === PRODUCTION ;
75
86module . exports = {
9- mode : environment ,
7+ mode : process . env . NODE_ENV || PRODUCTION ,
108 devtool : 'source-map' ,
119 entry : path . join ( root , 'index.js' ) ,
1210 target : 'node' ,
@@ -30,7 +28,7 @@ module.exports = {
3028 minimize : false
3129 } ,
3230 performance : {
33- hints : isProduction ? 'warning' : false
31+ hints : isProduction ( ) ? 'warning' : false
3432 } ,
3533 resolve : {
3634 extensions : [ '.js' , '.json' ]
Original file line number Diff line number Diff line change 1+ const { isUndefined } = require ( '../lib' ) ;
12const { EXCLUDED_ASYNC_TYPES } = require ( './constants' ) ;
23
3- const isUndefined = ( thing ) => [ null , undefined ] . includes ( thing ) ;
4-
54/**
65 * Returns proper context ref for a given trigger id.
76 * @param {ExecutionContext } parentContext - The parent context triggered the init
Original file line number Diff line number Diff line change 1+ /**
2+ * The production environment
3+ * @type {String }
4+ */
5+ const PRODUCTION = 'production' ;
6+
7+ module . exports = {
8+ PRODUCTION ,
9+ isProduction : ( ) => process . env . NODE_ENV || PRODUCTION ,
10+ isUndefined : ( thing ) => [ null , undefined ] . includes ( thing )
11+ } ;
You can’t perform that action at this time.
0 commit comments