-
-
Notifications
You must be signed in to change notification settings - Fork 383
chore(enhanced): migrate to rslib bundleless #4360
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3495d27ca2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (implementation) { | ||
| runtimePath = require.resolve( | ||
| `@module-federation/runtime/dist/index.esm.js`, | ||
| `@module-federation/runtime/dist/index.js`, | ||
| { | ||
| paths: [implementation], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolve runtime dist entry that doesn't exist
When options.implementation is provided, this now resolves @module-federation/runtime/dist/index.js, but the published runtime package only exposes dist/index.esm.js and dist/index.cjs.cjs (see packages/runtime/package.json exports/main/module). In that common case require.resolve will throw and the plugin fails before compilation. Using the same fallback logic as resolveDistEntry (or reverting to index.esm.js) avoids breaking custom implementations.
Useful? React with 👍 / 👎.
| if (this.options?.implementation) { | ||
| this.bundlerRuntimePath = require.resolve( | ||
| '@module-federation/webpack-bundler-runtime/dist/index.esm.js', | ||
| '@module-federation/webpack-bundler-runtime/dist/index.js', | ||
| { | ||
| paths: [this.options.implementation], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolve bundler runtime entry that doesn't exist
With options.implementation set, the code now resolves @module-federation/webpack-bundler-runtime/dist/index.js, but the package exports only dist/index.esm.js and dist/index.cjs.cjs (see packages/webpack-bundler-runtime/package.json). This throws during plugin setup for implementations that mirror the published layout, preventing builds from starting. The earlier .esm.js resolution (or a resolveDistEntry fallback) avoids this runtime failure.
Useful? React with 👍 / 👎.
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Per-package rslib bundleless migration for enhanced.