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(
74
74
// Development specific config
75
75
// --------------------------------------
76
76
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
-
83
77
// Add HMR support
84
78
config . entry . app = [ HMR_CLIENT , config . entry . app ] ;
79
+
85
80
config . plugins . push (
86
81
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 ( )
88
87
) ;
89
88
} else {
90
89
// --------------------------------------
91
90
// Production specific config
92
91
// --------------------------------------
93
- // CSS extraction
92
+ // Minify and optimize the JavaScript
94
93
config . plugins . push (
94
+ // CSS extraction
95
95
new ExtractTextPlugin ( {
96
96
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
101
99
new webpack . LoaderOptionsPlugin ( {
102
100
minimize : true
103
101
} )
You can’t perform that action at this time.
0 commit comments