File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -4,24 +4,16 @@ const webpack = require('webpack')
44const ExtractTextPlugin = require ( 'extract-text-webpack-plugin' )
55
66const production = process . env . NODE_ENV === 'production'
7-
8- console . log ( `Building CMS in ${ production ? 'production' : 'development' } mode` )
9-
10- const productionPlugins = production
11- ? [
12- new webpack . DefinePlugin ( {
13- 'process.env.NODE_ENV' : JSON . stringify ( 'production' ) ,
14- } ) ,
15- new webpack . optimize . UglifyJsPlugin ( ) ,
16- ]
17- : [ ]
7+ const mode = production ? 'production' : 'development'
8+ console . log ( `Building CMS in ${ mode } mode` )
189
1910module . exports = {
2011 entry : './cms.js' ,
2112 output : {
2213 filename : 'cms.bundle.js' ,
2314 path : path . resolve ( __dirname , '../public/admin/' ) ,
2415 } ,
16+ mode,
2517 stats : { warnings : false , children : false } ,
2618 module : {
2719 rules : [
@@ -52,6 +44,5 @@ module.exports = {
5244 new ExtractTextPlugin ( {
5345 filename : 'cms.bundle.css' ,
5446 } ) ,
55- ...productionPlugins ,
5647 ] ,
5748}
You can’t perform that action at this time.
0 commit comments