-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwebpack.prod.js
44 lines (38 loc) · 1.1 KB
/
webpack.prod.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
42
43
44
const path = require("path");
const common = require("./webpack.common.js");
const { merge } = require("webpack-merge");
const TerserPlugin = require("terser-webpack-plugin");
const CopyPlugin = require("copy-webpack-plugin");
module.exports = merge(common, {
entry: path.resolve(__dirname, "./src/game/main.ts"),
plugins: [
new CopyPlugin({
patterns: [
"fonts.css",
],
}),
],
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
terserOptions: {
ecma: undefined,
parse: {},
compress: {},
warnings: false,
module: false,
output: null,
toplevel: false,
nameCache: null,
mangle: true,
keep_classnames: false,
keep_fnames: false,
ie8: false,
safari10: false,
},
}),
],
},
mode: "production",
});