Skip to content

Commit 4f85d19

Browse files
author
Amr Wagdy
committed
Chore: Release v2.0.0
1 parent 8cf2110 commit 4f85d19

File tree

3 files changed

+394
-8
lines changed

3 files changed

+394
-8
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
"react-dom": "^18.2.0",
7575
"react-syntax-highlighter": "^10.2.0",
7676
"style-loader": "^0.23.1",
77+
"uglifyjs-webpack-plugin": "^2.2.0",
7778
"webpack": "^5.74.0",
7879
"webpack-cli": "^4.10.0",
7980
"webpack-dev-server": "^4.10.0"

webpack-demo.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const path = require('path');
22
const HtmlWebpackPlugin = require("html-webpack-plugin");
3+
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
34

45
const htmlWebpackPlugin = new HtmlWebpackPlugin({
56
template: path.join(__dirname, "examples/src/index.html"),
@@ -25,6 +26,12 @@ module.exports = {
2526
}
2627
]
2728
},
29+
optimization: {
30+
minimize: true,
31+
minimizer: [new UglifyJsPlugin({
32+
include: /\.min\.js$/
33+
})]
34+
},
2835
plugins: [htmlWebpackPlugin],
2936
resolve: {
3037
extensions: [".js", ".jsx"]

0 commit comments

Comments
 (0)