Skip to content

Commit

Permalink
Set default filename correctly if NODE_ENV is not set.
Browse files Browse the repository at this point in the history
It happens. Support the plebs.
  • Loading branch information
izaakschroeder committed Feb 7, 2018
1 parent 7e227f4 commit 2e2bcc3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ function ExtractTextPlugin(options) {
} else {
schemaTester(pluginSchema, options);
}
this.filename = options.filename || (process.env.NODE_ENV === 'development' ? '[name].css' : '[name].[contenthash].css');
this.filename = options.filename || (
!process.env.NODE_ENV || (process.env.NODE_ENV === 'development') ? '[name].css' : '[name].[contenthash].css'
);
this.id = options.id != null ? options.id : ++nextId;
this.options = {};
mergeOptions(this.options, options);
Expand Down

0 comments on commit 2e2bcc3

Please sign in to comment.