Add webui to exp_auto_restart

This commit is contained in:
Cooldude2606 committed 2026-09-26 23:26:00 +01:00
1 parent 2436fd2c5e
commit 9e9efeff75
6 files changed
+42 -3

No files matched your search

+2
View File
@@ -47,4 +47,6 @@ export const plugin: lib.PluginDeclaration = {
initialValue: false,
},
},
webEntrypoint: "./web",
};
+5 -2
View File
@@ -8,7 +8,7 @@
"type": "module",
"main": "dist/node/index.js",
"scripts": {
"prepare": "tsc --build",
"prepare": "tsc --build && webpack-cli --env production",
"test": "tap --type-strip-only --disable-coverage --allow-empty-coverage test/*.test.js",
"coverage": "tap --coverage-report=text test/*.test.js"
},
@@ -24,7 +24,10 @@
"@clusterio/lib": "workspace:^",
"@types/node": "catalog:",
"tap": "^21.1.0",
"typescript": "catalog:"
"typescript": "catalog:",
"webpack": "catalog:",
"webpack-cli": "catalog:",
"webpack-merge": "catalog:"
},
"publishConfig": {
"access": "public"
+4
View File
@@ -0,0 +1,4 @@
{
"extends": "../tsconfig.browser.json",
"include": [ "web/**/*.tsx", "web/**/*.ts", "package.json" ],
}
+2 -1
View File
@@ -1,6 +1,7 @@
{
"files": [],
"references": [
{ "path": "./tsconfig.node.json" }
{ "path": "./tsconfig.node.json" },
{ "path": "./tsconfig.browser.json" }
]
}
View File
Whitespace-only changes.
+29
View File
@@ -0,0 +1,29 @@
"use strict";
const path = require("path");
const webpack = require("webpack");
const { merge } = require("webpack-merge");
const common = require("@clusterio/web_ui/webpack.common");
module.exports = (env = {}) => merge(common(env), {
context: __dirname,
entry: "./web/index.tsx",
output: {
path: path.resolve(__dirname, "dist", "web"),
},
plugins: [
new webpack.container.ModuleFederationPlugin({
name: "exp_auto_restart",
library: { type: "window", name: "plugin_exp_auto_restart" },
exposes: {
"./": "./index.ts",
"./package.json": "./package.json",
"./web": "./web/index.tsx",
},
shared: {
"@clusterio/lib": { import: false },
"@clusterio/web_ui": { import: false },
},
}),
],
});