module-federation / core

Module Federation is a concept that allows developers to share code and resources across multiple JavaScript applications
https://module-federation.io/
MIT License
1.5k stars 226 forks source link

`shared` configuration not fully reflected in `mf-manifest.json` (enhanced federation with Rsbuild) #3101

Open foxylion opened 6 days ago

foxylion commented 6 days ago

Describe the bug

I tried configuring the shared section of the module federation configuration, but some changes are not being reflected in the mf-manifest.json file.

Steps to Reproduce:

The mf-manifest.json file reflects the singleton setting as true, despite my configuration setting it to false. Additionally, the requiredVersion specified in my configuration (^18.0.0) seems to be overridden by default values.

Reproduction

https://github.com/foxylion/rspack-examples/tree/repro/share-config-not-in-mf-manifest-json (Diff)

Used Package Manager

pnpm

System Info

System:
  OS: Linux 6.8 Ubuntu 24.04.1 LTS 24.04.1 LTS (Noble Numbat)
  CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700H
  Memory: 4.60 GB / 31.02 GB
  Container: Yes
  Shell: 5.9 - /bin/zsh
Binaries:
  Node: 20.18.0 - ~/.nvm/versions/node/v20.18.0/bin/node
  npm: 10.8.2 - ~/.nvm/versions/node/v20.18.0/bin/npm
  pnpm: 9.12.1 - ~/.local/share/pnpm/pnpm
Browsers:
  Chrome: 129.0.6668.100

Validations

foxylion commented 4 days ago

@ScriptedAlchemy do you have any thoughts on that? Is this possibly another Rsbuild related problem?

ScriptedAlchemy commented 4 days ago

@2heal1 can you cake a look at this?