mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 23:04:52 +09:00
The web files for plugins were hosted at /plugin/plugin_name/ while the view page for a plugin is hosted at /plugins/plugin_name/view. Reduce confusion by making both urls use the plural version.
34 lines
880 B
JavaScript
34 lines
880 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: {
|
|
publicPath: "/plugins/research_sync/",
|
|
filename: "bundle.js",
|
|
path: path.resolve(__dirname, "dist", "web"),
|
|
},
|
|
plugins: [
|
|
new webpack.container.ModuleFederationPlugin({
|
|
name: "research_sync",
|
|
library: { type: "var", name: "plugin_research_sync" },
|
|
filename: "remoteEntry.js",
|
|
exposes: {
|
|
"./info": "./info.js",
|
|
"./package.json": "./package.json",
|
|
},
|
|
shared: {
|
|
"@clusterio/lib/config": { import: false },
|
|
"@clusterio/lib/link": { import: false },
|
|
"@clusterio/web_ui": { import: false },
|
|
"ajv": { import: false },
|
|
},
|
|
}),
|
|
],
|
|
});
|