Skip to content

Commit 469ff06

Browse files
committed
update config
1 parent fdff04e commit 469ff06

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

webpack.config.js

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
1-
const TerserPlugin = require('terser-webpack-plugin');
1+
const path = require("path");
2+
const TerserPlugin = require("terser-webpack-plugin");
3+
const glob = require("glob");
24

35
module.exports = {
4-
mode: "production",
5-
entry: {
6-
"bundle.js": glob.sync("build/static/?(js|css)/main.*.?(js|css)").map(f => path.resolve(__dirname, f)),
7-
},
8-
output: {
9-
filename: "build/static/js/bundle.min.js",
10-
},
11-
module: {
12-
rules: [
13-
{
14-
test: /\.css$/,
15-
use: ["style-loader", "css-loader"],
16-
},
17-
],
18-
},
19-
optimization: {
20-
minimize: true,
21-
minimizer: [new TerserPlugin()],
22-
}
6+
mode: "production",
7+
entry: {
8+
"bundle.js": glob.sync("build/static/?(js|css)/main.*.?(js|css)").map(f => path.resolve(__dirname, f)),
9+
},
10+
output: {
11+
filename: "build/static/js/bundle.min.js",
12+
},
13+
module: {
14+
rules: [
15+
{
16+
test: /\.css$/,
17+
use: ["style-loader", "css-loader"],
18+
},
19+
],
20+
},
21+
optimization: {
22+
minimize: true,
23+
minimizer: [new TerserPlugin()],
24+
},
2325
};

0 commit comments

Comments
 (0)