Skip to content

Commit

Permalink
[MIRROR] Improves tgui build speed [MDB IGNORE](#862)
Browse files Browse the repository at this point in the history
* Improves tgui build speed (#79916)

---------

Co-authored-by: SkyratBot <[email protected]>
Co-authored-by: Jeremiah <[email protected]>
  • Loading branch information
3 people authored Nov 28, 2023
1 parent c066120 commit fe7fa9e
Show file tree
Hide file tree
Showing 3 changed files with 296 additions and 13 deletions.
2 changes: 1 addition & 1 deletion tgui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"babel-plugin-transform-remove-console": "^6.9.4",
"common": "workspace:*",
"css-loader": "^6.8.1",
"esbuild-loader": "^4.0.2",
"eslint": "^7.32.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-radar": "^0.2.1",
Expand All @@ -53,7 +54,6 @@
"sass": "^1.69.5",
"sass-loader": "^13.3.2",
"style-loader": "^3.3.3",
"terser-webpack-plugin": "^5.3.9",
"typescript": "^4.9.4",
"url-loader": "^4.1.1",
"webpack": "^5.89.0",
Expand Down
14 changes: 4 additions & 10 deletions tgui/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,11 @@ module.exports = (env = {}, argv) => {

// Production build specific options
if (mode === 'production') {
const TerserPlugin = require('terser-webpack-plugin');
const { EsbuildPlugin } = require('esbuild-loader');
config.optimization.minimizer = [
new TerserPlugin({
extractComments: false,
terserOptions: {
ie8: true,
output: {
ascii_only: true,
comments: false,
},
},
new EsbuildPlugin({
target: 'ie8',
css: true,
}),
];
}
Expand Down
Loading

0 comments on commit fe7fa9e

Please sign in to comment.