-
Notifications
You must be signed in to change notification settings - Fork 245
fix(nf): exhaustive secondary entrypoint resolving #1013
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
Merged
Aukevanoost
merged 21 commits into
angular-architects:main
from
Aukevanoost:fix/secondary-entry-points-II
Dec 18, 2025
Merged
fix(nf): exhaustive secondary entrypoint resolving #1013
Aukevanoost
merged 21 commits into
angular-architects:main
from
Aukevanoost:fix/secondary-entry-points-II
Dec 18, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…t an overload of bundles being created
…ndary entryPoints
e6f1056 to
2869ff2
Compare
1f21d3b to
22984fc
Compare
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Finalizing the exhaustive entrypoint resolving.
By default this PR doesn't change the behavior of native-federation. But it does provide a ton of options to improve the flexibility in bundling externals:
includeSecondaries improvement:
There are 3 extra options added to the includeSecondaries property of sharing:
Glob support for skips
Allows for skipping complete sections of secondary entrypoints when creating external bundles.
Resolving glob exports
Some packages have glob exports in their package.json files, by default these aren't resolved to keep the amount of exported externals to a minimum, but this can now be enabled.
Opting out of 'ignoreUnusedDeps'
It is now possible to opt-out of ignoreUnusedDeps per package, handy for when all secondary entrypoints of a certain package should be shared to avoid cross-remote imports.
New bundling type
Before this PR, there were only 2 ways to export externals. "separate" and "default". Where default meant bundling all entrypoints into 1 esbuild action for optimal performance and "separate" to bundle every entrypoint in a single bundle file. Now it's also possible to set a "package" build to bundle per package:
This can help to avoid dangling imports but will also bundle the externals of the package in that same package.
shareAll overrides
It is now possible to override certain externals in the shareAll function, this prevents certain secondary entrypoints from accidentally being added to the final remoteEntry.