Skip to content

Commit 2a25e06

Browse files
committed
fix(@angular-devkit/build-angular): allow ./ baseHref when using vite based server
Since this change 4b3a965 A warning is displayed when using `./` as a base href ``` (!) invalid "base" option: ".". The value can only be an absolute URL, "./", or an empty string. ```
1 parent d5a35d7 commit 2a25e06

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export async function* serveWithVite(
8686
if (serverOptions.servePath === undefined && baseHref !== undefined) {
8787
// Remove trailing slash
8888
serverOptions.servePath =
89-
baseHref[baseHref.length - 1] === '/' ? baseHref.slice(0, -1) : baseHref;
89+
baseHref !== './' && baseHref[baseHref.length - 1] === '/' ? baseHref.slice(0, -1) : baseHref;
9090
}
9191

9292
// The development server currently only supports a single locale when localizing.

0 commit comments

Comments
 (0)