vite
vite copied to clipboard
[Bug]: Partial shared package
trafficstars
Describe the bug
We try to override a shared package partially (sub path). In our case it is
shared: {
react: {
singleton: true,
},
'react-dom': {
singleton: true,
},
'@eschbach/app-sdk/extensions/shared/v1': {
singleton: true,
},
...mfOptions.shared,
},
The problem looks like it's here:
It is removing the path of the provided package using removePathFromNpmPackage and cannot find the key anymore.
https://github.com/module-federation/core/issues/3682#issuecomment-2799878077
Version
.
Reproduction
Company internal code, I'm sorry.
Relevant log output
Validations
- [x] Read the docs.
- [x] Read the common issues list.
- [x] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [x] The provided reproduction is a minimal reproducible example of the bug.
A workaround was found: declaring both.
'@eschbach/app-sdk/extensions/shared/v1': {
singleton: true,
},
'@eschbach/app-sdk': {
singleton: true,
},
Thanks for your feedback May I ask you to drop a PR to solve this issue?