GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Module Federation crashes with production configuration in Angular 21 · Issue #20332 · webpack/webpack

Module Federation crashes with production configuration in Angular 21 #20332

New issue
Copy link
New issue
Copy link
Closed
Bug
#20346
Closed
Module Federation crashes with production configuration in Angular 21#20332
Bug
#20346
Copy link
Assignees
hai-x
Labels
help wantedMaintainers welcome a community PR for this

Description

@leo2823
leo2823
opened on Jan 19, 2026
Issue body actions

Bug Description

Module federation crashes with a run-time error starting from @angular-devkit/[email protected] (which requires [email protected]). The error message is one of the following, according to the strategy of dependencies' sharing adopted (shareAll or share, you can find more into the webpack configuration of the reproduction example):

  • TypeError: Class extends value undefined is not a constructor or null
  • TypeError: (0 , c.bootstrapApplication) is not a function

[email protected] introduced some changes into the concatenateModules optimization option that seem to cause this error. I tested the webpack configuration disabling this option and no error was thrown.

Link to Minimal Reproduction and step to reproduce

https://github.com/leo2823/ng-mfe-issue
Steps:

  1. Run npm i
  2. Run ng serve --configuration=production

Expected Behavior

No run-time error thrown among the listed ones.

Actual Behavior

TypeError: (0 , c.bootstrapApplication) is not a function
at 6801 (801.js:1:1166)
at webpack_require (main.js:23:2346)

TypeError: Class extends value undefined is not a constructor or null
at 4360 (37.js:1:22082)
at webpack_require (main.js:23:2346)
at 9898 (37.js:1:51831)
at webpack_require (main.js:23:2346)

Environment

System:
    OS: Windows 11
  Binaries:
    Node: 24.12.0
    npm: 11.6.2
  Packages:
    webpack: 5.104.1

Is this a regression?

Yes (please specify version below)

Last Working Version

5.103

Additional Context

This commit seems to introduce the unexpected run-time errors.

Reacted by Alex Burck and Egor Volvachev

Activity

  1. alexander-akait
    added the
    Bug
    issue type on Jan 19, 2026
  2. alexander-akait
    added
    help wantedMaintainers welcome a community PR for this
    on Jan 19, 2026
  3. Prathmesh761 commented on Jan 19, 2026

    @Prathmesh761
    Prathmesh761
    on Jan 19, 2026 · Hidden as spam
    show commentMore actions
  4. Prathmesh761 commented on Jan 19, 2026

    @Prathmesh761
    Prathmesh761
    on Jan 19, 2026 · Hidden as spam
    show commentMore actions
  5. leo2823 commented on Jan 20, 2026

    @leo2823
    leo2823
    on Jan 20, 2026 · Hidden as spam
    Author
    show commentMore actions
  6. hai-x
    self-assigned this
    on Jan 20, 2026
  7. Prathmesh761 commented on Jan 20, 2026

    @Prathmesh761
    Prathmesh761
    on Jan 20, 2026 · Hidden as spam
    show commentMore actions
  8. leo2823 commented on Jan 21, 2026

    @leo2823
    leo2823
    on Jan 21, 2026 · Hidden as spam
    Author
    show commentMore actions
  9. burck1 commented on Jan 23, 2026

    @burck1
    burck1
    on Jan 23, 2026
    More actions

    Hi! We are able to consistently re-create the same error now with v20.3.15 of the @angular/cli and @angular-devkit/build-angular packages (released yesterday). It looks like this is because v20.3.15 of those packages depends on [email protected], whereas v20.3.14 depends on [email protected].

    As a workaround, we were able to downgrade to v20.3.14 (>=20.0.0 <20.3.15).

    Additionally, we tested the workaround provided by @leo2823, which also resolves the problem after we upgrade to v20.3.15 of the packages.

    Example webpack.config.js:

    const { share, withModuleFederationPlugin } = require('@angular-architects/module-federation/webpack');
    const { merge } = require('webpack-merge');
    
    module.exports = merge(
      withModuleFederationPlugin({
        name: 'my-app',
        shared: share({ /* ... */ }),
      }),
      {
        optimization: {
          concatenateModules: false,
        },
      },
    );

    Looking forward to testing after #20346 is released and the angluar packages are updated to use the new version.

  10. hai-x commented on Jan 23, 2026

    @hai-x
    hai-x
    on Jan 23, 2026
    Member
    More actions

    Looking forward to testing after #20346 is released and the angluar packages are updated to use the new version.

    @leo2823 Hi, you can just override webpack version to webpack@https://pkg.pr.new/webpack@17eb426 to test it. Thank you.

  11. leo2823 commented on Jan 23, 2026

    @leo2823
    leo2823
    on Jan 23, 2026
    Author
    More actions

    Hi @hai-x, thanks for your PR! I test it and I can confirm it fixes the error.

    Reacted by hai-x
  12. alexander-akait
    closed this as completedin #20346on Jan 26, 2026
  13. burck1 commented on Jan 27, 2026

    @burck1
    burck1
    on Jan 27, 2026
    More actions

    Thanks @hai-x and @leo2823! I tested the update with webpack@https://pkg.pr.new/webpack@3a73621 (latest on main after the merge) and it looks like that resolves the issue. Thanks!

    Reacted by hai-x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @hai-x
    hai-x

Labels

help wantedMaintainers welcome a community PR for this

Type

Bug

Fields

Priority

None yet

Effort

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.