Open dihmeetree opened 7 months ago
I haven't looked into the issue much yet, but if accessing /home
once is really slow, we might need to skip it on MacOS. Otherwise if it's only slow in repeated access, we might need to check if it's a caching issue so we only do it once.
Any updates on this? 👀
@dihmeetree I just noticed the same issue! Spent an hour trying to figure out why my Astro site was super fast except for the /home
route. Renamed it to /home2
for testing, and it went back to normal Astro fast interactivity. Finally updated the site to point to /
for the homepage.
My app details:
4.12.2
output: "server"
)@dihmeetree I just noticed the same issue! Spent an hour trying to figure out why my Astro site was super fast except for the
/home
route. Renamed it to/home2
for testing, and it went back to normal Astro fast interactivity. Finally updated the site to point to/
for the homepage.My app details:
- Framework: Astro
4.12.2
- Render Strategy: SSR (
output: "server"
)- View Transitions: enabled (Default animations)
Yeah hoping this will be fixed! 😄 Definitely an annoyance... haha. Thanks for sharing your app details!
Describe the bug
For some reason, if you create a route named
home
, it will take much longer to load than any other route (For example/test
and containing the same content). This has been reproduced with both SvelteKit and Astro frameworks) indev
mode.Note: This issue does not exist in production/preview (built/compiled) sites.
I've created an issue thread in the SvtelteKit repo for this issue https://github.com/sveltejs/kit/issues/12061#issuecomment-2067835993. I figured this was a SvelteKit issue at first, but it looks like this may be related to Vite (as user amit13k points out in the comment above)
If you're apart of the SvelteKit Discord, you can see our conversation here regarding the bug: https://discord.com/channels/457912077277855764/1223280626724241439
This issue seems to definitely affect Mac users. I've had 1 user say that they weren't affected on Linux, however another has said that they had the issue on Windows.
Reproduction
You can use my repo below, or just use the quickstart commands to create a project for both SvelteKit and Astro (included below) https://github.com/dihmeetree/svelte-bug-repro
Steps to reproduce
You can create a SvelteKit project quickly via the following command
In SvelteKit create a route (folder) named
home
, and create a+page.svelte
file inside it. Put some html in it and then load the/home
route in your browser. Create a/test
folder as well. The/home
route will load much slower than the/test
route.And for Astro
In Astro create a
home.astro
file in thepages
directory. It will be much slower than yourindex.astro
file.I've tested with
npm
,yarn
, andbun
to make sure it wasn't an issue with a package manager as well.System Info
Used Package Manager
bun
Logs
No logs that are relevant to the issue.
Validations