Skip to content

Commit

Permalink
Replace uglify with terser.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dixin committed Dec 13, 2020
1 parent 436f48d commit e9954a7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
2 changes: 0 additions & 2 deletions src/Etymology.Web/Client/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
<meta property="og:url" content="//hanziyuan.net" />
<meta property="og:image" content="//hanziyuan.net/images/favicons/logo.png" />
<meta name="robots" content="index, follow" />
<link rel="shortcut icon" href="images/favicons/favicon.ico" />


<link rel="apple-touch-icon" sizes="57x57" href="/images/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/images/favicons/apple-touch-icon-60x60.png">
Expand Down
2 changes: 1 addition & 1 deletion src/Etymology.Web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"html-loader": "^1.3.2",
"html-webpack-inline-source-plugin": "0.0.10",
"html-webpack-plugin": "^4.5.0",
"terser-webpack-plugin": "^5.0.3",
"to-string-loader": "^1.1.6",
"uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^5.10.1",
"webpack-cli": "^4.2.0",
"webpack-merge": "^5.7.0"
Expand Down
17 changes: 9 additions & 8 deletions src/Etymology.Web/webpack.config.Release.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const webpack = require("webpack");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
const TerserPlugin = require("terser-webpack-plugin");

const { merge } = require('webpack-merge');
const common = require("./webpack.config.js");
Expand Down Expand Up @@ -35,14 +35,15 @@ module.exports = merge(common, {
},
},
},
minimize: true,
minimizer: [
new UglifyJsPlugin({
uglifyOptions: {
compress: true,
output: {
comments: false
}
}
new TerserPlugin({
terserOptions: {
format: {
comments: false,
},
},
extractComments: false,
})
]
}
Expand Down

0 comments on commit e9954a7

Please sign in to comment.