Skip to content

Commit 46f9b43

Browse files
committed
chore(webpack): remove redundant expressions
1 parent f44d9f6 commit 46f9b43

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

src/webpack.config.js

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff 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
})

0 commit comments

Comments
 (0)