mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-11-14 00:14:52 +09:00
web/index.tsx is empty, so the web UI failed to load the plugin with "must export either a default function or WebPlugin". Plugins without a web UI, like clusterio's statistics_exporter, keep the empty file only as the webpack entry and expose just the plugin info and package.json. That is still enough for the web UI to show and edit the plugin's controller config. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
29 lines
706 B
JavaScript
29 lines
706 B
JavaScript
"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",
|
|
},
|
|
shared: {
|
|
"@clusterio/lib": { import: false },
|
|
"@clusterio/web_ui": { import: false },
|
|
},
|
|
}),
|
|
],
|
|
});
|