build: remove flat module bundle workaround from view engine #23826
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.
Removes an old flat module bundle workaround that was needed when we
still shipped release packages with View Engine. The Angular compiler
picks the
index.ts
files as entry-point for the flat module bundles(this whole flat module construct could be removed in the future anyway).
This was problematic because to avoid conflicts, the flat module out
file name was set to something unique that does not conflict with the
index file. The metadata JSON files for the
ng_module
targets (within our repo)then did not reside next to the
index
files, but rather next to theauto-generated flat module bundle. This broke the generation of
defineInjectable
(which was used in VE as well) calls.We worked around this in the past by patching the Angular compiler to
pick the public API file instead as entry-point; allowing us to let
the Angular compiler generate metadata and the bundle as
index.js
andindex.metadata.json
(ensuring the release output worked then).All of this is no longer needed with Ivy, so we can remove the
workaround and unblock angular/angular#43932
(which fails due to us patching some files in the compiler-cli package)