mirror of https://github.com/webpack/webpack.git
36 lines
733 B
JavaScript
36 lines
733 B
JavaScript
const ModuleFederationPlugin = require("../../../../lib/container/ModuleFederationPlugin");
|
|
|
|
function createConfig() {
|
|
return {
|
|
output: {
|
|
libraryTarget: "system"
|
|
},
|
|
plugins: [
|
|
new ModuleFederationPlugin({
|
|
name: "container",
|
|
filename: "container.js",
|
|
exposes: ["./other", "./self", "./dep"],
|
|
remotes: {
|
|
abc: "ABC",
|
|
def: "DEF",
|
|
self: "./container.js",
|
|
other: "./container2.js"
|
|
}
|
|
}),
|
|
new ModuleFederationPlugin({
|
|
name: "container2",
|
|
filename: "container2.js",
|
|
exposes: ["./other", "./self", "./dep"],
|
|
remotes: {
|
|
abc: "ABC",
|
|
def: "DEF",
|
|
self: "./container2.js",
|
|
other: "./container.js"
|
|
}
|
|
})
|
|
]
|
|
};
|
|
}
|
|
|
|
module.exports = createConfig();
|