Created
February 3, 2022 00:55
-
-
Save ryochin/30c6d2b08d44d2317a6dccdce1d9231e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/package.json b/package.json | |
index c0fc22b..6af8771 100644 | |
--- a/package.json | |
+++ b/package.json | |
@@ -25,6 +25,7 @@ | |
"sass": "^1.49.0", | |
"ts-loader": "^8.0.11", | |
"typescript": "^4.1.2", | |
+ "uglifyjs-webpack-plugin": "^2.2.0", | |
"urijs": "^1.19.7", | |
"vue": "^2.6.12", | |
"vue-class-component": "^7.2.6", | |
diff --git a/webpack.config.js b/webpack.config.js | |
index 90fef0b..132864a 100644 | |
--- a/webpack.config.js | |
+++ b/webpack.config.js | |
@@ -1,5 +1,6 @@ | |
const path = require("path") | |
const webpack = require("webpack") | |
+const UglifyJsPlugin = require('uglifyjs-webpack-plugin') | |
module.exports = { | |
mode: "production", | |
@@ -44,5 +45,16 @@ module.exports = { | |
lodash: '_', | |
urijs: 'URI', | |
'vue': 'Vue' | |
+ }, | |
+ optimization: { | |
+ minimizer: [ | |
+ new UglifyJsPlugin({ | |
+ uglifyOptions: { | |
+ output: { | |
+ ascii_only: true | |
+ } | |
+ } | |
+ }) | |
+ ] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment