Loading TypeScript file assets via HttpClient can cause dev-server errors with the browser-esbuild and application builders #26641
Labels
area: @angular-devkit/build-angular
devkit/build-angular:dev-server
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
No response
Description
While running the application through the dev-server via
npm start
, when a TypeScript file is loaded from the assets via the HttpClient, it seems to be analyzed by the vite:import-analysis plugin. If there are any references that cannot be resolved, this plugin will cause the load of this TypeScript asset file to fail and display an error message on the page.Minimal Reproduction
Minimal reproduction repository: https://github.com/jinbijin/vite-ts-assets
ng serve
, and navigate to the served page.Expected result: Both HTTP calls succeed.
Actual result: The HTTP call into the asset folder fails, and an error is displayed on the page.
Exception or Error
Your Environment
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: