build: enable update of @angular/bazel
#26834
Merged
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.
Enables updating of
@angular/bazel
. We stopped because:@angular/bazel
was updated to no longer produce CommonJS devmodets_library
patches to no longer produce CommonJS devmode.We can make these changes to unblock the update, but it would be a significant effort as all
nodejs_binary
targets would need to be updated to execute ESM natively (as there obviously is no CJS anymore). This is what we did as an experiment in framework to run tests/code natively using.mjs
. We are not going to do it here as we would rather want to put the effort into switching to a toolchain that supports ESM properly.. without patches.For now we are just reversing the change in
ng_module
so that it still produces devmode CommonJS. Components repo will not use for tests etc, but it's there to allow fornodejs_binary
CommonJS targets, and to avoid having to perform a large migration. See all the patches that are needed in framework:https://github.com/angular/angular/tree/main/tools/esm-interop