This commit is contained in:
2025-01-17 19:32:03 +09:00
parent 7ab271fb8b
commit 182bccb652
10 changed files with 274 additions and 2 deletions

28
webpack.config.js Normal file
View File

@@ -0,0 +1,28 @@
"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.jsx",
output: {
path: path.resolve(__dirname, "dist", "web"),
},
plugins: [
new webpack.container.ModuleFederationPlugin({
name: "chat_sync",
library: { type: "var", name: "plugin_chat_sync" },
exposes: {
"./": "./info.js",
"./package.json": "./package.json",
},
shared: {
"@clusterio/lib": { import: false },
"@clusterio/web_ui": { import: false },
},
}),
],
});