-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.prod.js
51 lines (49 loc) · 1.19 KB
/
webpack.config.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
45
46
47
48
49
50
51
const common = require("./webpack.config.common")
const merge = require("webpack-merge")
const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin")
const HtmlWebpackPlugin = require("html-webpack-plugin")
module.exports = merge.smart(common, {
devtool: "source-map",
mode: "production",
// module: {
// rules: [
// {
// test: /\.tsx?$/,
// loaders: [
// {
// loader: "ts-loader",
// options: {
// transpileOnly: true,
// },
// },
// ],
// },
// ],
// },
// optimization: {
// splitChunks: {
// // name: false,
// },
// },
plugins: [
new HtmlWebpackPlugin({
template: "src/index.ejs",
inject: true,
minify: {
collapseWhitespace: true,
keepClosingSlash: true,
minifyCSS: true,
minifyJS: true,
minifyURLs: true,
removeComments: true,
removeEmptyAttributes: true,
removeRedundantAttributes: true,
removeStyleLinkTypeAttributes: true,
useShortDoctype: true,
},
}),
// new ForkTsCheckerWebpackPlugin({
// eslint: true,
// }),
],
})