Skip to content

Getting error when integrating module federation Plugin #637

@abhiseksubham

Description

@abhiseksubham

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions