sveltejs / kit

web development, streamlined
https://svelte.dev/docs/kit
MIT License
18.76k stars 1.96k forks source link

+layout.svelte is being passed as a route parameter #10926

Closed pajohns closed 1 day ago

pajohns commented 1 year ago

Describe the bug

When a CSS file that has been generated by sass is imported into the project, route endpoints are called more than once when the Chrome debugger is open with an incorrect route parameter being passed in. For example, if I have a route

src/routes/organisations/[organisationId]/clients/[clientId]

and in this directory I have a +page.server.js and a +page.svelte I can navigate to this route without a problem. I have included a debug in the +page.server.js that will log the route parameters. When navigating to http://localhost:5173/organisations/1/clients/1 This is what I get:

{"organisationId":"1","clientId":"1"}

When I have imported a CSS file that has been generated by the sass CLI into a