-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Windows: css not loaded on navigation #606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I am running into a similar issue after build on a dockerized linux instance |
In fact, the SSR version works. The CSS is injected on SSR request. (navigate to page2 and reload browser) |
As a potential workaround for this you can extract all the css, bundle it up and serve it statically: in const css = require('rollup-plugin-css-only');
module.exports = {
kit: {
vite: {
plugins: [
css({ output: 'bundle.css' })
]
}
}
} and to serve it, in <link rel="stylesheet" href="/./_app/bundle.css"> |
It works today with 79. I think we can close this, @aloker. |
Describe the bug
When navigating from one page to another, the css of the second page is not loaded. This only happens when building the app on Windows, on Linux (WSL2 on Windows), the css file is correctly loaded.
I've created a simple repo for reproduction: https://github.com/aloker/svelte-kit-issue-load-on-nav
First page:

A click on "To page 2" shows this on WSL2:


Network requests (notice the css for page2 at the enc):
And this on Windows (missing the styling):


Network requests (no css for page2):
Logs
There are no errors in the console
To Reproduce
Expected behavior
CSS files should be loaded for pages
Information about your SvelteKit Installation:
Windows:
System:
OS: Windows 10 10.0.19042
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 18.54 GB / 31.81 GB
Binaries:
Node: 14.16.0 - c:\tools\node\node.EXE
Yarn: 1.22.10 - c:\tools\node\yarn.CMD
npm: 7.6.3 - c:\tools\node\npm.CMD
Browsers:
Edge: Spartan (44.19041.423.0), Chromium (89.0.774.57)
Internet Explorer: 11.0.19041.1
npmPackages:
@sveltejs/kit: next => 1.0.0-next.55
svelte: ^3.29.0 => 3.35.0
Linux:
System:
OS: Linux 5.4 Ubuntu 20.04.2 LTS (Focal Fossa)
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 23.83 GB / 24.91 GB
Container: Yes
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 14.16.0 - /usr/bin/node
Yarn: 1.22.10 - /mnt/c/tools/node/yarn
npm: 7.7.0 - /usr/bin/npm
npmPackages:
@sveltejs/kit: next => 1.0.0-next.55
svelte: ^3.29.0 => 3.35.0
Tested on latest Firefox, Chrome and Vivaldi browsers
Tested with node and static adapters with same result.
Severity
Show stopper for pure Windows development, although when using WSL2 it works fine.
The text was updated successfully, but these errors were encountered: