Performance: Route groups
Route groups affect page load speed by organizing routes without adding extra URL segments, impacting routing efficiency and bundle loading.
src/routes/(admin)/dashboard.svelte
// Using route groups with parentheses to organize routes without changing URLssrc/routes/admin/dashboard.svelte
// Using folders without parentheses, adding extra URL segments| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Route groups without URL impact | Minimal - only relevant route nodes loaded | 0 reflows from routing | Low paint cost due to faster load | [OK] Good |
| Routes with extra URL segments | More nodes parsed and loaded | 1+ reflows if layout changes | Higher paint cost from delayed content | [X] Bad |
route groups in a SvelteKit project?(group).(admin).src/routes/(dashboard)/stats/+page.svelte
src/routes/(dashboard)/settings/+page.svelte
stats page?stats folder is inside the group, so URL is just /stats.(admin) inside src/routes but your routes inside it are not working. What is a likely cause?+page.svelte inside.+page.svelte or route file exists, routes won't work.profile and settings under a common group without changing their URLs. Which folder structure achieves this correctly?(user) folder to group profile and settings routes without adding /user to URLs.Pass the test and this pattern moves unknown