Bug: esbuild builder 3rd party libs built not properly with browserify paths #27495
Labels
angular/build:dev-server
area: angular/build
freq1: low
Only reported by a handful of users who observe it rarely
severity3: broken
type: bug/fix
Command
serve
Is this a regression?
The previous version in which this bug was not present was
none
Description
We're currently in the evaluation of replacing the Webpack with ESBuild process from Angular.
The only blocker right now is, that the path replacements for the building process does not work as expected and the application directly crashes into a white screen.
Minimal Reproduction
https://github.com/JohnnyDevNull/angular17-esbuild-browserify-error
npm install
ng serve
Open the app and you will directly see an Vite warning and the error from the 3rd party library we are using
fhir
in this case for the healthcare sector.As you can see in the configs below I've added the
paths
andbrowser
properties to help esbuild understand the mapping, but it does not work anyways.Just to mention, the 3rd party library is a CommonJS library, which we cannot avoid here, so its added to the
allowedCommonJsDependencies
configuration.tsconfig.json
package.json
Exception or Error
Your Environment
Anything else relevant?
This issue was already reported with #26901 but sadly to say closed. I hope you have now a better picture with my simple reproduction repo.
The text was updated successfully, but these errors were encountered: