Skip to content

[Webpack 5] Module Federation plugin does not work #186

@damian131

Description

@damian131

I'm submitting a bug report

  • Library Version:
    5.0.0

Please tell us about your environment:

  • Operating System:
    Windows 10

  • Node Version:
    10.18.1

  • NPM Version:
    6.13.4

  • JSPM OR Webpack AND Version
    webpack 5.42.0

  • Browser:
    Chrome 91.0.4472.124 (Official Build) (64-bit)

  • Language:
    TypeScript 4.2.4

Current behavior:
Once configuring Webpack Federation Module for two Aurelia projects (one is a host and another one is a remote component), the host is not requesting for remoteEntry.js from the remote component.

Both of the projects have a clean setup built using au new and they are migrated to Webpack 5.

Host's Module Federation plugin config:
image

Remote Component's Module Federation plugin config:
image

Remote Component's function definition:
image

Host using Remote Component's function:
image

Build has succeeded, but the issue occurs during runtime. remoteEntry.js is not issued by the host:
image

However it has been successfully generated on the remote component side:
image

You can find all code in this repo: https://github.com/damian131/aurelia-module-federation

Expected/desired behavior:
remoteEntry.js file is requested by the host which eventually ends up with remote component's function being called on the host side.

What is the motivation / use case for changing the behavior?
Having ability to use Module Federation plugin within Aurelia apps and taking advantage from micro-frontend architecture.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions