Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module Federation emits zero-sized files #20428

Closed
2 of 15 tasks
glebmachine opened this issue Apr 1, 2021 · 4 comments
Closed
2 of 15 tasks

Module Federation emits zero-sized files #20428

glebmachine opened this issue Apr 1, 2021 · 4 comments

Comments

@glebmachine
Copy link

glebmachine commented Apr 1, 2021

🐞 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 [email protected]: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?

@alan-agius4
Copy link
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.

@glebmachine
Copy link
Author

glebmachine commented Apr 4, 2021

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

Please reopen

Related to feature request: #17556

@BenRacicot
Copy link

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

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants