Skip to content

Commit a9c6b44

Browse files
clydinangular-robot[bot]
authored andcommitted
fix(@angular-devkit/build-angular): normalize Vite dev-server Windows asset paths
When using the esbuild-based browser application builder with the Vite-based development server on Windows, source asset paths were previously not normalized prior to being included in request URLs. This could result in invalid asset request URLs due to invalid path segment separators.
1 parent 419cc82 commit a9c6b44

File tree

1 file changed

+1
-1
lines changed
  • packages/angular_devkit/build_angular/src/builders/dev-server

1 file changed

+1
-1
lines changed

packages/angular_devkit/build_angular/src/builders/dev-server/vite-server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ export async function setupServer(
267267
// Rewrite all build assets to a vite raw fs URL
268268
const assetSourcePath = assets.get(pathname);
269269
if (assetSourcePath !== undefined) {
270-
req.url = `/@fs/${assetSourcePath}`;
270+
req.url = `/@fs/${normalizePath(assetSourcePath)}`;
271271
next();
272272

273273
return;

0 commit comments

Comments
 (0)