Skip to content

Commit

Permalink
fix: module federation missing in landing prod
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwanth1109 committed Jan 7, 2021
1 parent 1e811a3 commit fa43487
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions landing/webpack.prod.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { merge } = require("webpack-merge");
const ModuleFederationPlugin = require("webpack/lib/container/ModuleFederationPlugin");
const commonConfig = require("./webpack.common");
const packageJson = require("./package.json");

module.exports = () => {
const prodConfig = {
Expand All @@ -8,6 +10,16 @@ module.exports = () => {
publicPath: "/landing/",
filename: "[name].[hash].js",
},
plugins: [
new ModuleFederationPlugin({
name: "landing",
filename: "remoteEntry.js",
exposes: {
"./LandingModule": "./src/bootstrap",
},
shared: packageJson.dependencies,
}),
],
};

return merge(commonConfig, prodConfig);
Expand Down

0 comments on commit fa43487

Please sign in to comment.