aboutsummaryrefslogtreecommitdiff
path: root/webpack.config.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2024-03-29 19:52:13 +0300
committerGravatar Vitaly Takmazov2024-03-29 19:52:13 +0300
commit04f5d65e7ade5ffbfe363efb7ebcd1151f8b68fd (patch)
tree800ca80942a9dd358c1941c8ff1daeef4af2cc87 /webpack.config.js
parentb09a61b534e6967ddf9427b85285108605f44fe5 (diff)
webpack: extract css in development mode
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/webpack.config.js b/webpack.config.js
index 450adeeb..c4e7361f 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -30,7 +30,7 @@ module.exports = (env, argv) => {
test: /\.(css)$/,
use: [
{
- loader: dev ? 'style-loader' : MiniCssExtractPlugin.loader,
+ loader: MiniCssExtractPlugin.loader,
},
{
loader: 'css-loader',
@@ -62,6 +62,7 @@ module.exports = (env, argv) => {
}]
},
plugins: [
+ new MiniCssExtractPlugin({ filename: 'style.css' })
],
resolve: {
symlinks: false,
@@ -86,8 +87,6 @@ module.exports = (env, argv) => {
failOnError: true,
fix: false
}))
- } else {
- config.plugins.push(new MiniCssExtractPlugin({ filename: 'style.css' }))
}
config.optimization = {
minimize: !dev,