Skip to content

Commit 092f117

Browse files
committed
chore: replace UglifyJsPlugin with TerserPlugin
1 parent 286c955 commit 092f117

File tree

7 files changed

+13
-389
lines changed

7 files changed

+13
-389
lines changed

dist/MindElixirLite.js

Lines changed: 0 additions & 35 deletions
This file was deleted.

dist/example1.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/example2.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/test.html

Lines changed: 0 additions & 342 deletions
This file was deleted.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mind-elixir",
3-
"version": "0.19.2",
3+
"version": "0.19.3",
44
"description": "Mind elixir is a free open source mind map core.",
55
"main": "dist/MindElixir.js",
66
"scripts": {
@@ -47,9 +47,9 @@
4747
"puppeteer-to-istanbul": "^1.4.0",
4848
"regenerator-runtime": "^0.13.7",
4949
"style-loader": "^3.3.1",
50+
"terser-webpack-plugin": "^5.3.1",
5051
"ts-loader": "^9.2.6",
5152
"typescript": "^4.4.3",
52-
"uglifyjs-webpack-plugin": "2.1.3",
5353
"url-loader": "^4.1.1",
5454
"webpack": "5.70.0",
5555
"webpack-bundle-analyzer": "^4.5.0",

webpack.config.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const path = require('path')
22
// const webpack = require('webpack')
33
const HtmlWebpackPlugin = require('html-webpack-plugin')
4-
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
4+
const TerserPlugin = require('terser-webpack-plugin')
55
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
66
// .BundleAnalyzerPlugin
77

@@ -78,13 +78,16 @@ module.exports = (env, argv) => {
7878
// new BundleAnalyzerPlugin()
7979
// ],
8080
optimization: {
81-
minimizer: [new UglifyJsPlugin({
82-
uglifyOptions: {
83-
compress: {
84-
drop_console: true,
81+
minimize: true,
82+
minimizer: [
83+
new TerserPlugin({
84+
terserOptions: {
85+
compress: {
86+
drop_console: true,
87+
},
8588
},
86-
},
87-
})],
89+
}),
90+
],
8891
},
8992
}
9093
}

0 commit comments

Comments
 (0)