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.
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
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.
|Issue Title||Created Date||Updated Date|