-
-
Notifications
You must be signed in to change notification settings - Fork 365
feat(enhanced): add alias-aware providing and consuming for shared modules #4049
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
base: main
Are you sure you want to change the base?
Conversation
…shared modules - Add opencode.json with alias-resolver agent for fixing webpack alias issues - Add comprehensive prompt documentation for Module Federation alias resolution - Add failing test case demonstrating shared module alias bug - Add AGENTS.md with repository guidelines and commands
- Add alias resolution support for shared modules - Relax strict instance matching to package identity checks - Implement version inference from module source - Add caching for consume shared modules - Update test expectations for alias sharing
… provide hook - ConsumeSharedPlugin: simplify factorize flow (no behavior change) - Rename nodeModulesReconstructedLookup to allowNodeModulesSuffixMatch - ProvideSharedPlugin: add helpers for layer checks and prefix matches - Mark alias resolver docs out of scope BREAKING CHANGE: option renamed to allowNodeModulesSuffixMatch
- Use descriptionFileData to build candidates (pkgName/relative path) - Match candidates in consume and provide hooks - Keep behavior/gating for suffix/prefix matching
This reverts commit 667a941.
This reverts commit 5a67bc8.
…Factory; update docs" This reverts commit 42a9b47.
…dules - Add Stage 3 in ProvideSharedPlugin to recognize aliased imports when only target is shared - Add Stage 6 in ConsumeSharedPlugin to resolve aliased requests against shared config - Add aliasResolver utility for extracting node_modules paths - Add provide-only config test case and unit test for alias-aware behavior - Clean up existing alias test assertions - Update .gitignore to include test mock node_modules
|
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…only Adds the required node_modules/next/dist/compiled/react/index.js stub that the alias points to, fixing the failing config case test.
Apply suggested changes
…registers tests immediately
Summary
react
→next/dist/compiled/react
) are recognized as shared when only the target is in shared configChanges
share-with-aliases-provide-only
config test case and focused unit test for provide-only alias-aware behavioraliasResolver.ts
for extracting node_modules paths and path normalizationThis enhancement enables Module Federation to work seamlessly with bundler alias configurations (Next.js, Webpack aliases, etc.) without requiring manual workarounds.