sveltejs / sapper

The next small thing in web development, powered by Svelte
https://sapper.svelte.dev
MIT License
7.01k stars 435 forks source link

Navigation stuck if depending on the same CSS over multiple components #1753

Open trmcnvn opened 3 years ago

trmcnvn commented 3 years ago

If you have a setup such as this:

components/
  Header.svelte // Includes <style /> CSS
routes/
  subroute/
    _layout.svelte // Imports Header.svelte
    index.svelte // Imports Header.svelte
  index.svelte // Links to /subroute

Navigation gets stuck on client-side navigation to /subroute, SSR works if going directly to /subroute.

This was introduced in Sapper v0.28.7 as previous versions work as expected.

I've set up a replication here: https://github.com/trmcnvn/sapper-css-replication

trmcnvn commented 2 years ago

Fixed by #1790