Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): allow ./ baseHref when using vi…
Browse files Browse the repository at this point in the history
…te 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.
```
  • Loading branch information
alan-agius4 committed Feb 1, 2024
1 parent d5a35d7 commit 2a25e06
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export async function* serveWithVite(
if (serverOptions.servePath === undefined && baseHref !== undefined) {
// Remove trailing slash
serverOptions.servePath =
baseHref[baseHref.length - 1] === '/' ? baseHref.slice(0, -1) : baseHref;
baseHref !== './' && baseHref[baseHref.length - 1] === '/' ? baseHref.slice(0, -1) : baseHref;
}

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

0 comments on commit 2a25e06

Please sign in to comment.