We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Astro v5.2.0 Node v18.20.3 System Linux (x64) Package Manager npm Output server Adapter @astrojs/node Integrations @astrojs/alpinejs
No response
The dev server redirects the src files request and causes a vite internal server error after upgrading to Astro v5.2.0.
// Without the trailingSlash config, src file requests redirect to 404.
trailingSlash
src
// When trailingSlash is set to 'always', requests to @vite/client return 404.
'always'
@vite/client
Return 200 and it would not break the page on dev server.
https://stackblitz.com/edit/github-4nxjmnm3?file=astro.config.mjs
The text was updated successfully, but these errors were encountered:
I can reproduce the issue in Astro 5.2.0:
trailingSlash: 'always'
npm run dev
Result:
Sorry, something went wrong.
Thanks. I have a fix #13095
@ascorbic Thanks for the quick fix. However, the issue still exists as the srcDir files goes with double slashes path.
srcDir
The collapseDuplicateTrailingSlashes function should exclude those paths as well.
// @astrojs/internal-helpers/path.js function collapseDuplicateTrailingSlashes(path, trailingSlash) { if (!path) { return path; } if (path.startsWith('/@') || path.startsWith('/_')) { return path; } return path.replace(MANY_TRAILING_SLASHES, trailingSlash ? "/" : "") || "/"; }
Successfully merging a pull request may close this issue.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
The dev server redirects the src files request and causes a vite internal server error after upgrading to Astro v5.2.0.
// Without the

trailingSlash
config,src
file requests redirect to 404.// When


trailingSlash
is set to'always'
, requests to@vite/client
return 404.What's the expected result?
Return 200 and it would not break the page on dev server.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-4nxjmnm3?file=astro.config.mjs
Participation
The text was updated successfully, but these errors were encountered: