You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
When using the Angular Application Builder (@angular/build:browser) on Windows 11 (or Windows Server 2022), script tags are not injected into index.html if the project is accessed through a Windows junction.
This happens when preserveSymlinks: true is configured and occurs both during ng serve and ng build.
The same project works correctly when:
accessed via its real filesystem path (not through a junction), or
built using the legacy Webpack builder (@angular-devkit/build-angular:browser).
No errors or warnings are reported during the build or serve process.
This issue is the same as #27119 and is still reproducible with Angular 21.
Expected behavior
index.html should contain the injected script tags
Actual behavior
index.html is generated without any script tags
The page loads as a blank page
No CLI errors or warnings are shown
The build output otherwise appears successful
Minimal Reproduction
Create a new Angular project: ng new junction-repro cd junction-repro
Enable symlink preservation:
add "preserveSymlinks": true in angular.json
Create a Windows junction pointing to the project directory: mklink /J C:\temp\junction-repro C:\realpath\junction-repro
Open the project via the junction path: cd C:\temp\junction-repro ng serve
Command
build, serve
Is this a regression?
The previous version in which this bug was not present was
No response
Description
When using the Angular Application Builder (@angular/build:browser) on Windows 11 (or Windows Server 2022), script tags are not injected into index.html if the project is accessed through a Windows junction.
This happens when
preserveSymlinks: trueis configured and occurs both during ng serve and ng build.The same project works correctly when:
No errors or warnings are reported during the build or serve process.
This issue is the same as #27119 and is still reproducible with Angular 21.
Expected behavior
Actual behavior
Minimal Reproduction
Create a new Angular project:
ng new junction-reprocd junction-reproEnable symlink preservation:
add
"preserveSymlinks": truein angular.jsonCreate a Windows junction pointing to the project directory:
mklink /J C:\temp\junction-repro C:\realpath\junction-reproOpen the project via the junction path:
cd C:\temp\junction-reprong serveOpen the application in the browser.
see also #27119 for a setup with Dev Drives
Exception or Error
Your Environment
Anything else relevant?
The issue does not occur when:
"builder": "@angular-devkit/build-angular:browser"