Skip to content

Server route resolution breaks styles in .svelte files #13491

Description

@amanita-green

Describe the bug

When using the new router: { resolution: 'server' } option to resolve routes on the server, the style tags in .svelte files will no longer work upon loading a route, at least not with @sveltejs/adapter-node. The styles will only appear when refreshing the page.

Reproduction

https://github.com/amanita-green/sveltekit-style-issue

Logs

System Info

System:
    OS: Linux 6.13 Arch Linux
    CPU: (32) x64 AMD Ryzen 9 7950X 16-Core Processor
    Memory: 45.75 GB / 62.01 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 22.14.0 - ~/.nvm/versions/node/v22.14.0/bin/node
    Yarn: 1.22.22 - /usr/bin/yarn
    npm: 10.9.2 - ~/.nvm/versions/node/v22.14.0/bin/npm
  Browsers:
    Brave Browser: 133.1.75.175
    Chromium: 133.0.6943.53
  npmPackages:
    @sveltejs/adapter-auto: ^4.0.0 => 4.0.0 
    @sveltejs/adapter-node: ^5.2.12 => 5.2.12 
    @sveltejs/kit: ^2.17.2 => 2.17.2 
    @sveltejs/vite-plugin-svelte: ^5.0.3 => 5.0.3 
    svelte: ^5.20.2 => 5.20.2 
    vite: ^6.1.1 => 6.1.1

Severity

annoyance

Additional Information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions