Create minimap core plugin based on gridworld plugin

This commit is contained in:
Danielv123 committed 2025-08-10 00:28:48 +02:00
1 parent f31fb535df
commit f7658e1118
14 files changed
+1129

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
"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: "minimap",
library: { type: "var", name: "plugin_minimap" },
exposes: {
"./": "./index.ts",
"./package.json": "./package.json",
"./web": "./web/index.tsx",
},
shared: {
"@clusterio/lib": { import: false },
"@clusterio/web_ui": { import: false },
"antd": { import: false },
"react": { import: false },
"react-dom": { import: false },
},
}),
],
optimization: {
chunkIds: "named",
},
});