react-app-rewired icon indicating copy to clipboard operation
react-app-rewired copied to clipboard

Getting error when integrating module federation Plugin

Open abhiseksubham opened this issue 3 years ago • 1 comments

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.

abhiseksubham avatar Nov 30 '22 14:11 abhiseksubham

@abhiseksubham Got anywhere with it?

abdelrahmanshalaby15 avatar Sep 11 '24 12:09 abdelrahmanshalaby15