Skip to content

Commit e252aae

Browse files
committed
chore(website): Update webpack config
1 parent be1e19c commit e252aae

File tree

3 files changed

+5
-17
lines changed

3 files changed

+5
-17
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@
102102
"rollup-plugin-replace": "^2.0.0",
103103
"rollup-plugin-uglify": "^3.0.0",
104104
"standard-version": "^4.2.0",
105-
"style-loader": "^0.20.0",
106105
"uglifyjs-webpack-plugin": "^1.0.1",
107106
"webpack": "^4.6.0",
108107
"webpack-cli": "^2.0.14",

webpack.config.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ const plugins = [
2121
},
2222
}),
2323
new MiniCssExtractPlugin({
24-
filename: "[name].css",
25-
chunkFilename: "app-[id].css"
24+
filename: '[name]-[contenthash].css',
25+
chunkFilename: '[name]-[contenthash].css',
2626
}),
2727
];
2828

2929
if (!isDev) {
3030
plugins.push(
3131
new webpack.DefinePlugin({
32-
'process.env.NODE_ENV': JSON.stringify('production')
33-
})
32+
'process.env.NODE_ENV': JSON.stringify('production'),
33+
}),
3434
);
3535
}
3636

@@ -62,13 +62,9 @@ module.exports = {
6262
],
6363
},
6464
{
65-
test: /\.less$/,
65+
test: /\.(less|css)$/,
6666
use: [MiniCssExtractPlugin.loader, 'css-loader', 'less-loader'],
6767
},
68-
{
69-
test: /\.css$/,
70-
use: [MiniCssExtractPlugin.loader, 'css-loader'],
71-
},
7268
{
7369
test: /\.html$/,
7470
use: [

yarn.lock

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8666,13 +8666,6 @@ strip-json-comments@~2.0.1:
86668666
version "2.0.1"
86678667
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
86688668

8669-
style-loader@^0.20.0:
8670-
version "0.20.3"
8671-
resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.20.3.tgz#ebef06b89dec491bcb1fdb3452e913a6fd1c10c4"
8672-
dependencies:
8673-
loader-utils "^1.1.0"
8674-
schema-utils "^0.4.5"
8675-
86768669
supports-color@^2.0.0:
86778670
version "2.0.0"
86788671
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"

0 commit comments

Comments
 (0)