mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-11 23:04:52 +09:00
Move the target folder for the built web interface to dist/web/ instead of static/. This better follows the norm for npm packages to include built files in the dist/ folder and also allows putting other built files into that folder in the future.
31 lines
746 B
JavaScript
31 lines
746 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: "research_sync",
|
|
library: { type: "var", name: "plugin_research_sync" },
|
|
filename: "remoteEntry.js",
|
|
exposes: {
|
|
"./info": "./info.js",
|
|
},
|
|
shared: {
|
|
"@clusterio/lib": { import: false },
|
|
"@clusterio/web_ui": { import: false },
|
|
"ajv": { import: false },
|
|
},
|
|
}),
|
|
],
|
|
});
|