Files
factorio-expcluster/exp_auto_restart/webpack.config.cjs
T
bbassieandClaude Opus 5.5 8dbe1b4a19 Drop the empty web entrypoint from exp_auto_restart
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>
2026-09-27 00:13:38 +00:00

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 },
},
}),
],
});