You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
native-federation/native-federation-core#145 builds shared mappings apart from exposed modules,
so setup()/build() now run once per mapping bundle plus once for mapping-or-exposed, each
with its own Angular context. Nothing breaks until the ~4.6.0 core range is bumped.
updateFederationTsConfig replaces files wholesale
(src/tools/esbuild/update-federation-tsconfig.ts:57). Each context's setup() overwrites files with only its own entry points, so the mapping entries drop out of the program. In
watch mode, a mapping that only files pulls in rebuilds without error but keeps serving its
old content.
Fix: write the union of all Angular contexts' entry points into files.
native-federation/native-federation-core#145 builds shared mappings apart from exposed modules,
so
setup()/build()now run once per mapping bundle plus once formapping-or-exposed, eachwith its own Angular context. Nothing breaks until the
~4.6.0core range is bumped.updateFederationTsConfigreplacesfileswholesale(
src/tools/esbuild/update-federation-tsconfig.ts:57). Each context'ssetup()overwritesfileswith only its own entry points, so the mapping entries drop out of the program. Inwatch mode, a mapping that only
filespulls in rebuilds without error but keeps serving itsold content.
Fix: write the union of all Angular contexts' entry points into
files.Only
mapping-or-exposedis disposed (src/builders/build/builder.ts:532), so the mappingcontexts never reset Angular's shared TS state before the app build (buildForFederation corrupts globalSharedCompilationState, causing "polyfills.ts missing from TypeScript compilation" on Linux #47). The no-arg
dispose()also stops esbuild, which the app build still needs.Fix: dispose every
isMappingOrExposedcontext, leaving esbuild running.A shared
SourceFileCacheacross the contexts needs no change: Angular shares one the same waybetween its browser, polyfills and server bundles.