core
core copied to clipboard
NodeNext ModuleResolution type issue
Describe the bug
We are seeing type issues when importing module-federation packages when our tsconfig uses moduleResolution of NodeNext. As far as I can tell this PR should have fixed it, but I'm seeing the same issue in my example.
The reproduction repo is a simple pnpm based package, where the index files tries to import something from module-federation, while the tsconfig uses NodeNext, and you can see the type issue arise. If you switch the module and moduleResolution back to ESNext and Bundler the issue goes away.
Reproduction
https://github.com/TSMI235/ModuleFederation-NodeNext
Used Package Manager
pnpm
System Info
System:
OS: macOS 15.6.1
CPU: (12) arm64 Apple M2 Pro
Memory: 110.69 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.16.0 -
Yarn: 4.5.1 -
npm: 10.8.1 -
bun: 1.2.16 -
Deno: 2.5.6 -
Browsers:
Chrome: 142.0.7444.135
Safari: 26.1
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] Make sure this is a Module federation issue and not a framework-specific issue.
- [x] The provided reproduction is a minimal reproducible example of the bug.