Example style isn't applied in Chrome (but is applied in Incognito)

This issue has been tracked since 2021-05-10.

I have no idea why this is happening, but when I run the example app and navigate to localhost:3000, I get the unstyled app. In Incognito I get the styles.

In the dev console, I see the following message:

Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:3000/bundle.css".

However, this appears in Incognito as well.

I've tried disabling the cache, but no luck.

HartS wrote this answer on 2021-05-10

Tried a few more things: using instead of localhost allows styles to load correctly. Same with a domain that resolves to

HartS wrote this answer on 2021-05-10

More updates: This seems like a Chrome bug, or a problem with the way the service worker is caching global.css. Even when disable cache is selected, I can see that the file is coming from the service worker; I navigated to the sources panel and took a look at global.css in a panel where styles were working and where they weren't. It turns out the contents are altogether different

HartS wrote this answer on 2021-05-10

Final update: Loading the global.css file directly from localhost resulted in a stale file, from the service worker. This stale file persisted after Chrome was restarted and even updated. I was finally able to force the file to update by selecting (in dev tools) Application>Service Workers, and then selecting 'bypass for network'

Closing as this is likely not an issue in Svelte-routing, and presumably an issue in whatever dependency is managing SW caching (rollup or livereload perhaps). Feel free to create an issue with one of those projects if you're able to figure out where it's originating.

More Details About Repo
Owner Name EmilTholin
Repo Name svelte-routing
Full Name EmilTholin/svelte-routing
Language JavaScript
Created Date 2017-11-28
Updated Date 2022-12-03
Star Count 1711
Watcher Count 21
Fork Count 151
Issue Count 59


Issue Title Created Date Updated Date