mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 23:04:52 +09:00
Add page listing the plugins installed on the master along with a detailed page for each plugin with fields from their package.json. Failure to load the module and version missmatch is also reported. This adds ./packages.json as required part of the webpack module.
32 lines
782 B
JavaScript
32 lines
782 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.jsx",
|
|
output: {
|
|
filename: "bundle.js",
|
|
path: path.resolve(__dirname, "dist", "web"),
|
|
},
|
|
plugins: [
|
|
new webpack.container.ModuleFederationPlugin({
|
|
name: "global_chat",
|
|
library: { type: "var", name: "plugin_global_chat" },
|
|
filename: "remoteEntry.js",
|
|
exposes: {
|
|
"./info": "./info.js",
|
|
"./package.json": "./package.json",
|
|
},
|
|
shared: {
|
|
"@clusterio/lib": { import: false },
|
|
"@clusterio/web_ui": { import: false },
|
|
"ajv": { import: false },
|
|
},
|
|
}),
|
|
],
|
|
});
|