@@ -155,7 +155,7 @@ Builder.prototype.reset = function(baseLoader) {
155155 loader . pluginLoader . config ( cfg ) ;
156156 var lCfg = extend ( { } , cfg ) ;
157157 // build environment is not production or the browser, but will follow nodeConfig, because the build is in Node
158- lCfg . browserConfig = lCfg . productionConfig = undefined ;
158+ lCfg . browserConfig = lCfg . productionConfig = lCfg . devConfig = undefined ;
159159 loaderConfig . call ( this , lCfg ) ;
160160 loader . configHash = generateConfigHash ( loader ) ;
161161 } ;
@@ -338,7 +338,7 @@ function processTraceOpts(options, defaults) {
338338 browser : undefined ,
339339 node : undefined ,
340340 production : undefined ,
341- development : undefined ,
341+ dev : undefined ,
342342 traceAllConditionals : true ,
343343 conditions : { } ,
344344 traceConditionsOnly : false ,
@@ -354,7 +354,7 @@ function processTraceOpts(options, defaults) {
354354 } ;
355355
356356 // ensure user environment overrides default environment
357- if ( options ) {
357+ if ( typeof options == 'object' ) {
358358 if ( typeof options . browser == 'boolean' || typeof options . node == 'boolean' ) {
359359 // browser true/false -> node is opposite
360360 if ( typeof options . browser == 'boolean' && typeof options . node != 'boolean' )
@@ -364,11 +364,14 @@ function processTraceOpts(options, defaults) {
364364 options . browser = ! options . node ;
365365 }
366366
367- if ( typeof options . development == 'boolean' || typeof options . production == 'boolean' ) {
367+ // development -> dev backwards compat
368+ if ( 'development' in options )
369+ options . dev = options . development ;
370+ if ( typeof options . dev == 'boolean' || typeof options . production == 'boolean' ) {
368371 if ( typeof options . production != 'boolean' )
369- options . production = ! options . development ;
370- if ( typeof options . development != 'boolean' )
371- options . development = ! options . production ;
372+ options . production = ! options . dev ;
373+ if ( typeof options . dev != 'boolean' )
374+ options . dev = ! options . production ;
372375 }
373376 }
374377
@@ -389,6 +392,8 @@ function processTraceOpts(options, defaults) {
389392 if ( typeof opts . production == 'boolean' ) {
390393 opts . conditions [ '@system-env|production' ] = opts . production ;
391394 opts . conditions [ '~@system-env|production' ] = opts . development ;
395+ opts . conditions [ '@system-env|dev' ] = opts . development ;
396+ opts . conditions [ '~@system-env|dev' ] = opts . production ;
392397 }
393398
394399 return opts ;
0 commit comments