Skip to content

Module Federation emits zero-sized files聽#20428

Closed

Description

@glebmachine

馃悶 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

It's early version bug

Description

It's report about early support of webpack 5 and module federation.
When internal library added as shared dependency, cli emits zero-sized files
image

A clear and concise description of the problem...

馃敩 Minimal Reproduction

Repro:

  1. git clone git@github.com:glebmachine/module-federation-zero-sized-bundle.git
  2. yarn
  3. ./node_modules/.bin/ng run shell:serve

Step to repair build:

  1. Open projects\shell\webpack.config.js
  2. Comment 8 line:
    image

馃敟 Exception or Error

See picture above

馃實 Your Environment

Angular CLI: 12.0.0-next.6
Node: 12.14.1
OS: win32 x64

Angular: 12.0.0-next.6
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1200.0-next.6
@angular-devkit/build-angular   0.1200.0-next.6
@angular-devkit/core            12.0.0-next.6
@angular-devkit/schematics      12.0.0-next.6
@schematics/angular             12.0.0-next.6
@schematics/update              0.1200.0-next.6
ng-packagr                      11.2.4
rxjs                            6.6.6
typescript                      4.2.3



Anything else relevant?

Activity

  1. alan-agius4 commented on Apr 2, 2021

    @alan-agius4
    Collaborator

    Hi @glebmachine,

    Thanks for opening this issue. While the Angular CLI allows extending the Webpack configuration by doing so you are venturing on the unsupported path as Angular tooling team doesn't provide support for builds using custom Webpack configurations.

    I suggest that you file an issue https://github.com/angular-architects/module-federation-plugin and raise an issue with the author of this package. My initial though here are that they need to provide a custom logging function that handles the information provided by Webpack when using Module Federation.

  2. glebmachine commented on Apr 4, 2021

    @glebmachine
    Author

    @alan-agius4 here is a repro without manfred's plugin.
    Unfortunately It is angular-cli bug

    Please reopen

    Related to feature request: #17556

  3. BenRacicot commented on Apr 15, 2021

    @BenRacicot

    I messaged you on Twitter @glebmachine. Perhaps you can open this issue in the CLI repo? I'd like to help you get this going. @BenRacicot

  4. angular-automatic-lock-bot commented on May 16, 2021

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  5. locked and limited conversation to collaborators on May 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions