Permalink
Browse files

Fix browser conditionals

  • Loading branch information...
1 parent 43294e6 commit 1111454561253c9fb5041b48f48c99f2bcdedad3 bcronin committed Aug 22, 2016
Showing with 25 additions and 11 deletions.
  1. +25 −11 webpack.config.js
View
@@ -10,19 +10,33 @@ var devtool = undefined;
if (CONFIG === 'debug') {
devtool = "source-map";
+ plugins.push(
+ new webpack.DefinePlugin({
+ 'process.env': {
+ 'NODE_ENV': '"debug"'
+ }
+ })
+ );
} else {
bundleSuffix = ".min";
- plugins.push(new webpack.optimize.UglifyJsPlugin({
- minimize: true,
- compress : {
- dead_code : true,
- unused : true,
- // Hide the dead code warnings. The defines intentionally create
- // dead code paths.
- warnings : false,
- }
- }));
- plugins.push(new webpack.optimize.DedupePlugin());
+ plugins.push(
+ new webpack.DefinePlugin({
+ 'process.env': {
+ 'NODE_ENV': '"production"'
+ }
+ }),
+ new webpack.optimize.UglifyJsPlugin({
+ minimize: true,
+ compress : {
+ dead_code : true,
+ unused : true,
+ // Hide the dead code warnings. The defines intentionally create
+ // dead code paths.
+ warnings : false,
+ },
+ }),
+ new webpack.optimize.DedupePlugin()
+ );
}
//

0 comments on commit 1111454

Please sign in to comment.