-
Notifications
You must be signed in to change notification settings - Fork 2
/
webpack.config.js
41 lines (35 loc) · 1.04 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
const pathHelpers = require("path");
const TerserPlugin = require("terser-webpack-plugin");
const config = {
mode: "production",
optimization: {
minimizer: [
new TerserPlugin({
terserOptions: {
// BEGIN DEFAULTS
// https://cs.github.com/webpack/webpack/blob/753fdea847fafe2f1a7e1cb2324e5f7cafa63c83/lib/config/defaults.js#L1127
compress: {
passes: 2,
},
// END DEFAULTS
mangle: false,
output: {
beautify: true,
},
},
}),
],
},
// mode: "development",
// optimization: {
// usedExports: true,
// },
// // Prevent eval(…)
// devtool: "source-map",
entry: pathHelpers.join(__dirname, "./src/index.js"),
output: {
path: pathHelpers.join(__dirname, "./target"),
filename: "webpack.js",
},
};
module.exports = config;