Skip to content

PoC: Enable Angular cache for Exposed modules#1067

Closed
Aukevanoost wants to merge 5 commits intomainfrom
issues/1063
Closed

PoC: Enable Angular cache for Exposed modules#1067
Aukevanoost wants to merge 5 commits intomainfrom
issues/1063

Conversation

@Aukevanoost
Copy link
Collaborator

@Aukevanoost Aukevanoost commented Feb 18, 2026

Linked to #1063

Performance optimization

This PoC proofs a better way of (re)using the Angular compilerPlugin and SourceFileCache to rebuild files on changes.

  • Use a lighter "rebuildForFederation" instead of the fullsize "buildForFederation" if a file changes: diff
  • Use SourceFileCache to build up a cache of already transpiled files.
  • Reworked the nf adapters into a 3-part class: setup, build and dispose. Where build can be called multiple times.

What's missing

  • Cache invalidation, right now the changes cannot be detected by the rebuild function so the cached ts file is returned (changed files are not processed).

@Aukevanoost
Copy link
Collaborator Author

Closing since this fix will be released in v4.
https://github.com/orgs/native-federation/discussions/20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant