-
Notifications
You must be signed in to change notification settings - Fork 12k
Angular new browser-esbuild different behaviour with baseHref #26618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
Comments
alan-agius4
added a commit
to alan-agius4/angular-cli
that referenced
this issue
Dec 8, 2023
…uses server not to be accessible without trailing slash This commit fixes an issue were when using a `baseHref` with trailing slash, vite dev-server would have been only accessible via a URL with a trailing slash. As vite would redirect to an error page similar to the below; ``` The server is configured with a public base URL of /myapp/ - did you mean to visit [/myapp/](http://localhost:4200/myapp/) instead? ``` Closes: angular#26618
alan-agius4
added a commit
to alan-agius4/angular-cli
that referenced
this issue
Dec 8, 2023
…uses server not to be accessible without trailing slash This commit fixes an issue were when using a `baseHref` with trailing slash, vite dev-server would have been only accessible via a URL with a trailing slash. As vite would redirect to an error page similar to the below; ``` The server is configured with a public base URL of /myapp/ - did you mean to visit [/myapp/](http://localhost:4200/myapp/) instead? ``` Closes: angular#26618
clydin
pushed a commit
that referenced
this issue
Dec 8, 2023
…uses server not to be accessible without trailing slash This commit fixes an issue were when using a `baseHref` with trailing slash, vite dev-server would have been only accessible via a URL with a trailing slash. As vite would redirect to an error page similar to the below; ``` The server is configured with a public base URL of /myapp/ - did you mean to visit [/myapp/](http://localhost:4200/myapp/) instead? ``` Closes: #26618
clydin
pushed a commit
that referenced
this issue
Dec 8, 2023
…uses server not to be accessible without trailing slash This commit fixes an issue were when using a `baseHref` with trailing slash, vite dev-server would have been only accessible via a URL with a trailing slash. As vite would redirect to an error page similar to the below; ``` The server is configured with a public base URL of /myapp/ - did you mean to visit [/myapp/](http://localhost:4200/myapp/) instead? ``` Closes: #26618 (cherry picked from commit 4b3a965)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Which @angular/* package(s) are the source of the bug?
Don't known / other
Is this a regression?
Yes
Description
Hello,
As the Vite and Esbuild are out of the developer preview, I tried to use it for my company projects.
It works well except that for each of our apps we had a specific behaviour that we didn't notice before using Vite.
All our app are using a baseHref like this:
"baseHref": "/myapp/"
But all links to our apps are like this:
http://mydomain.com/myapp
What's happening without Vite and EsBuild is that the trailing "/" was automatically added (don't know by who exactly), and by using Vite and Esbuild, it's not added automatically anymore we are getting an error page:
The server is configured with a public base URL of /myapp/ - did you mean to visit /myapp/ instead?
Did you know about this behaviour (didn't find any issue about it) ?
Do you plan to fix it or are you considering that it is now a standard behaviour ?
Thanks for your answer !
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
No response
The text was updated successfully, but these errors were encountered: