No longer includes externalDependencies in esbuild exclusions #30048
Labels
angular/build:dev-server
area: @angular/build
freq1: low
Only reported by a handful of users who observe it rarely
severity5: regression
type: bug/fix
Command
serve
Is this a regression?
The previous version in which this bug was not present was
19.2.1
Description
The bug is here: https://github.com/angular/angular-cli/pull/29753/files#diff-725bf17eb0a0bed74c9aaca5f4c4ff2b2239a664a4baac4b29a43d961069adf7
Previously, the call to
setExternalMetadata
contained everything included in angular.json "target.build.options.externalDependencies". It no longer does.If I add for instance
to my angular.json, and add a console.log right before the call to
setExternalMetadata
in@angular/build/src/builders/application/execute-build.js
like this:19.2.1
19.2.2
I can see that
buildingResult.externalConfiguration
contains my externalDependencies, but[...explicitExternal]
does not.It seems that the change tries to collect known dependencies on client or server side and checks the result agains the externalDependencies. But if the dependencies are not known ahead of time, it will ignore them in the output. This makes SSR configurations using frameworks like NestJS hard to use.
Minimal Reproduction
Example repo:
https://github.com/OysteinAmundsen/home
Try to
bun install && bun start
- it works fine.Try to upgrade @angular-devkit/build-angular to 19.2.2 and
bun install && bun start
. It breaks withException or Error
Your Environment
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: