File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ var loaderSchema = require('./schema/loader-schema');
1515var pluginSchema = require ( './schema/plugin-schema.json' ) ;
1616
1717var NS = fs . realpathSync ( __dirname ) ;
18- var DEV = process . env . NODE_ENV === 'development' ;
1918var nextId = 0 ;
2019
2120function ExtractTextPluginCompilation ( ) {
@@ -108,7 +107,7 @@ function ExtractTextPlugin(options) {
108107 } else {
109108 schemaTester ( pluginSchema , options ) ;
110109 }
111- this . filename = options . filename || ( DEV ? '[name].css' : '[name].[contenthash].css' ) ;
110+ this . filename = options . filename || ( process . env . NODE_ENV === 'development' ? '[name].css' : '[name].[contenthash].css' ) ;
112111 this . id = options . id != null ? options . id : ++ nextId ;
113112 this . options = { } ;
114113 mergeOptions ( this . options , options ) ;
@@ -292,7 +291,7 @@ ExtractTextPlugin.prototype.apply = function(compiler) {
292291
293292 // HMR: inject file name into corresponding javascript modules in order to trigger
294293 // appropriate hot module reloading of CSS
295- if ( DEV ) {
294+ if ( process . env . NODE_ENV === 'development' ) {
296295 compilation . plugin ( "before-chunk-assets" , function ( ) {
297296 extractedChunks . forEach ( function ( extractedChunk ) {
298297 extractedChunk . modules . forEach ( function ( module ) {
You can’t perform that action at this time.
0 commit comments