-
-
Notifications
You must be signed in to change notification settings - Fork 384
Closed
Description
Describe the bug
Hello there,
we are facing issues with shared modules after the patch release 0.22.1. The code execution never reaches beyond the imports on top of our entry file. We are purely using the build plugin and when I remove the shared property from it, then everything works again.
It's also definitely because of these changes in packages/runtime-core/src/shared/index.ts from this commit 88bee80, because when I undo that in node_modules, then it also works again as before.
This is our config:
new ModuleFederationPlugin({
name: "api",
filename: "api.js",
exposes: {
"./API": "./src/api/index",
},
remotes: {
[...]
},
shared: {
react: { singleton: false, requiredVersion: packageData.dependencies.react },
"react-dom": { singleton: false, requiredVersion: packageData.dependencies["react-dom"] },
},
runtimePlugins: [path.join(__dirname, "./src/mf-plugins/retry.ts")],
}),
Our remotes are using the api from our host, so is it maybe an issue with circular dependencies?
Any help would be appreciated!
Reproduction
.
Used Package Manager
npm
System Info
System:
OS: Linux 6.8 Ubuntu 24.04.3 LTS 24.04.3 LTS (Noble Numbat)
CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
Memory: 17.64 GB / 31.26 GB
Container: Yes
Shell: 5.9 - /usr/bin/zsh
Binaries:
Node: 24.7.0 - /home/kai/.nvm/versions/node/v24.7.0/bin/node
Yarn: 1.22.22 - /home/kai/.nvm/versions/node/v24.7.0/bin/yarn
npm: 11.8.0 - /home/kai/.nvm/versions/node/v24.7.0/bin/npm
pnpm: 9.4.0 - /home/kai/.nvm/versions/node/v24.7.0/bin/pnpm
bun: 1.3.0 - /home/kai/.bun/bin/bun
Browsers:
Chrome: 142.0.7444.59Validations
- Read the docs.
- Read the common issues list.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Module federation issue and not a framework-specific issue.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels