Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error when integrating module federation Plugin #637

Open
abhiseksubham opened this issue Nov 30, 2022 · 0 comments
Open

Getting error when integrating module federation Plugin #637

abhiseksubham opened this issue Nov 30, 2022 · 0 comments

Comments

@abhiseksubham
Copy link

abhiseksubham commented Nov 30, 2022

Hi,

I am using below code to install module federation plugin :

const ModuleFederationPlugin = require("webpack/lib/container/ModuleFederationPlugin"); console.log(ModuleFederationPlugin); module.exports = { webpack: function (config, env) { config.externals = function (context, request, callback) { if (/canvg|pdfmake/.test(request)) { return callback(null, "commonjs " + request); } callback(); }; // if (!config.plugins) { config.plugins = []; // } config.plugins.push( new ModuleFederationPlugin({ name: "app_1", filename: "remoteEntry.js", remotes: { app_2: "app_2@http://localhost:8081/remoteEntry.js", }, }) ); return config; }, };

However it throws an error saying "Cannot read properties of undefined (reading 'includes')".

Please help. if any integration examples with MF plugin, please provide those links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant