Skip to content

Commit 2e2bcc3

Browse files
Set default filename correctly if NODE_ENV is not set.
It happens. Support the plebs.
1 parent 7e227f4 commit 2e2bcc3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ function ExtractTextPlugin(options) {
110110
} else {
111111
schemaTester(pluginSchema, options);
112112
}
113-
this.filename = options.filename || (process.env.NODE_ENV === 'development' ? '[name].css' : '[name].[contenthash].css');
113+
this.filename = options.filename || (
114+
!process.env.NODE_ENV || (process.env.NODE_ENV === 'development') ? '[name].css' : '[name].[contenthash].css'
115+
);
114116
this.id = options.id != null ? options.id : ++nextId;
115117
this.options = {};
116118
mergeOptions(this.options, options);

0 commit comments

Comments
 (0)