File tree 1 file changed +2
-3
lines changed
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');
15
15
var pluginSchema = require ( './schema/plugin-schema.json' ) ;
16
16
17
17
var NS = fs . realpathSync ( __dirname ) ;
18
- var DEV = process . env . NODE_ENV === 'development' ;
19
18
var nextId = 0 ;
20
19
21
20
function ExtractTextPluginCompilation ( ) {
@@ -108,7 +107,7 @@ function ExtractTextPlugin(options) {
108
107
} else {
109
108
schemaTester ( pluginSchema , options ) ;
110
109
}
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' ) ;
112
111
this . id = options . id != null ? options . id : ++ nextId ;
113
112
this . options = { } ;
114
113
mergeOptions ( this . options , options ) ;
@@ -292,7 +291,7 @@ ExtractTextPlugin.prototype.apply = function(compiler) {
292
291
293
292
// HMR: inject file name into corresponding javascript modules in order to trigger
294
293
// appropriate hot module reloading of CSS
295
- if ( DEV ) {
294
+ if ( process . env . NODE_ENV === 'development' ) {
296
295
compilation . plugin ( "before-chunk-assets" , function ( ) {
297
296
extractedChunks . forEach ( function ( extractedChunk ) {
298
297
extractedChunk . modules . forEach ( function ( module ) {
You can’t perform that action at this time.
0 commit comments