File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed
Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -74,30 +74,28 @@ export default function webpackNetlifyCmsConfig(
7474 // Development specific config
7575 // --------------------------------------
7676 if ( nuxtOptions . dev ) {
77- // Add friendly error plugin
78- config . plugins . push ( new FriendlyErrorsWebpackPlugin ( ) ) ;
79-
80- // https://webpack.js.org/plugins/named-modules-plugin
81- config . plugins . push ( new webpack . NamedModulesPlugin ( ) ) ;
82-
8377 // Add HMR support
8478 config . entry . app = [ HMR_CLIENT , config . entry . app ] ;
79+
8580 config . plugins . push (
8681 new webpack . HotModuleReplacementPlugin ( ) ,
87- new webpack . NoEmitOnErrorsPlugin ( )
82+ new webpack . NoEmitOnErrorsPlugin ( ) ,
83+ // Add friendly error plugin
84+ new FriendlyErrorsWebpackPlugin ( ) ,
85+ // https://webpack.js.org/plugins/named-modules-plugin
86+ new webpack . NamedModulesPlugin ( )
8887 ) ;
8988 } else {
9089 // --------------------------------------
9190 // Production specific config
9291 // --------------------------------------
93- // CSS extraction
92+ // Minify and optimize the JavaScript
9493 config . plugins . push (
94+ // CSS extraction
9595 new ExtractTextPlugin ( {
9696 filename : "style.[contenthash].css"
97- } )
98- ) ;
99- // This is needed in webpack 2 for minify CSS
100- config . plugins . push (
97+ } ) ,
98+ // This is needed in webpack 2 for minify CSS
10199 new webpack . LoaderOptionsPlugin ( {
102100 minimize : true
103101 } )
You can’t perform that action at this time.
0 commit comments