mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 15:04:52 +09:00
Fix minimized web_ui build stripping class names
The data class pattern used for request and event payloads require the class names to be preserved as they are used for identifying the type of the requests and events.
This commit is contained in:
1 parent
7f8a700716
commit
04b46540fb
2 files changed
+15
No files matched your search
@@ -37,6 +37,7 @@
|
||||
"react-router-dom": "^5.2.0",
|
||||
"stream-browserify": "^3.0.0",
|
||||
"style-loader": "^2.0.0",
|
||||
"terser-webpack-plugin": "^5.3.9",
|
||||
"util": "^0.12.3",
|
||||
"webpack": "^5.73.0",
|
||||
"webpack-cli": "^4.9.2",
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
const webpack = require("webpack");
|
||||
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
|
||||
const { WebpackManifestPlugin } = require("webpack-manifest-plugin");
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
|
||||
module.exports = (env = {}) => ({
|
||||
mode: env.production ? "production" : "development",
|
||||
@@ -113,5 +114,18 @@ module.exports = (env = {}) => ({
|
||||
},
|
||||
optimization: {
|
||||
moduleIds: "deterministic",
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
terserOptions: {
|
||||
compress: {
|
||||
keep_classnames: true,
|
||||
passes: 2,
|
||||
},
|
||||
mangle: {
|
||||
keep_classnames: true,
|
||||
},
|
||||
},
|
||||
}),
|
||||
],
|
||||
},
|
||||
});
|
||||
Reference in new issue
Block a user