question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ssr: false - Breaks all styling

See original GitHub issue

Describe the bug Styling seems to break when npm run build && npm start with ssr: false.

npm start dev appears to be fine.

To Reproduce npm init svelte@next ssr: false in svelte.config.cjs npm run build && npm start

  • The output of npx envinfo --system --npmPackages svelte,@sveltejs/kit,vite --binaries --browsers
  System:
    OS: macOS 11.2.2
    CPU: (8) arm64 Apple M1
    Memory: 373.28 MB / 8.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 15.12.0 - /opt/homebrew/bin/node
    npm: 7.6.3 - /opt/homebrew/bin/npm
  Browsers:
    Firefox: 87.0
    Safari: 14.0.3
    Safari Technology Preview: 14.2
  npmPackages:
    @sveltejs/kit: next => 1.0.0-next.71 
    svelte: ^3.29.0 => 3.37.0 
    vite: ^2.1.0 => 2.1.5 
  • Your browser Firefox
  • Your adapter (e.g. Node, static, Vercel, Begin, etc…) Tested on node & static

Severity How severe an issue is this bug to you? Is this annoying, blocking some users, blocking an upgrade or blocking your usage of SvelteKit entirely?

Production builds appear to be blocked for users not using ssr

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:7
  • Comments:19 (17 by maintainers)

github_iconTop GitHub Comments

2reactions
mattiashcommented, Apr 8, 2021

I have the same issue with all styles disappearing with ssr: false. Rolling back to kit 1.0.0-next.65 made styles appear again.

1reaction
jcbcncommented, Apr 8, 2021

Thanks @mattiash, can confirm rolling back to 1.0.0-next.65 has worked as a temporary fix for me as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Wrong styles applied during SSR hydration #351 - GitHub
Styled components is applying wrong styles during SSR hydration. The problem is that styles in production builds are swapped across ...
Read more >
Why setting SSR to false is breaking my styles in Nextjs
I have a Nextjs app. I have used it to build the Coinbase clone. Since it uses window object to connect to metamsk,...
Read more >
Why We're Breaking Up with CSS-in-JS - DEV Community ‍ ‍
Runtime CSS-in-JS libraries work by inserting new style rules when components render, and this is bad for performance on a fundamental level. 2....
Read more >
Master code splitting with dynamic imports in Next.js - Daily.dev
If the ssr is true, the code-split components are pre-rendered on the server, if false they are rendered on the client-side(i.e in the...
Read more >
Docs • Svelte
Components are the building blocks of Svelte applications. They are written into .svelte files, using a superset of HTML. All three sections —...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found