Webpack Build Improvements (#791)

* Bump @swc/core to 1.13.3

* Switch to using --mode production rather than --env

Closes #792

* Add cache
This commit is contained in:
Cooldude2606 authored and GitHub committed 2025-08-17 15:54:37 +01:00
1 parent d2bd1382ba
commit 681e78967f
20 files changed
+28 -27

No files matched your search

+2 -2
View File
@@ -6,7 +6,7 @@
"version": "2.0.0-alpha.21",
"main": "dist/node/index.js",
"scripts": {
"prepare": "tsc --build && webpack-cli --env production",
"prepare": "tsc --build && webpack-cli --mode production",
"test": "echo \"Error: no test specified\" && exit 1"
},
"bin": {
@@ -37,7 +37,7 @@
},
"devDependencies": {
"@clusterio/web_ui": "workspace:*",
"@swc/core": "^1.11.1",
"@swc/core": "^1.13.3",
"@types/busboy": "^1.5.0",
"@types/compression": "^1.7.2",
"@types/express": "^4.17.17",
-1
View File
@@ -405,7 +405,6 @@ export default class Controller {
const webpackConfigs = [];
if (args.dev) {
webpackConfigs.push(require("../../../webpack.config")({})); // Path outside of build
}
if (args.devPlugin) {
+1 -1
View File
@@ -5,7 +5,7 @@ const { merge } = require("webpack-merge");
const common = require("@clusterio/web_ui/webpack.common");
module.exports = (env = {}) => merge(common(env), {
module.exports = (env = {}, argv = {}) => merge(common(env, argv), {
context: __dirname,
entry: "./web/index.tsx",
devServer: {