Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Script not work on server side render #1621

Closed
suciptoid opened this issue Oct 30, 2020 · 2 comments
Closed

Script not work on server side render #1621

suciptoid opened this issue Oct 30, 2020 · 2 comments

Comments

@suciptoid
Copy link

Describe the bug
When page load in server side render (direct access eg: /dashboard), the script on page not work. But when in client side render (eg: navigating from login page -> dashboard), it work.

The problem occurs when:

  • Nested layout (not affected nested route without _layout.svelte)
  • Using tailwindcss with svelte-preprocess (when disable tailwind/svelte-preporcess bug not happen)
  • Server render only

Logs
No log on server console / client console

To Reproduce
Reproduce: https://github.com/tegalan/sapper-tailwind-bug-reproduce
Video demo: https://github.com/tegalan/sapper-tailwind-bug-reproduce/blob/main/Screen%20Recording%202020-10-30%20at%2022.34.49.mov

Expected behavior
Script work both on client and server render

Stacktraces

Information about your Sapper Installation:

  System:
    OS: macOS 10.15.7
    CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz
    Memory: 229.14 MB / 8.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 14.10.1 - /var/folders/v5/30n9fn2n3b983y0zb1gjkr400000gn/T/fnm-shell-8541211/bin/node
    npm: 6.14.8 - /var/folders/v5/30n9fn2n3b983y0zb1gjkr400000gn/T/fnm-shell-8541211/bin/npm
  Browsers:
    Chrome: 86.0.4240.111
  • Local machine
  • Firebase hosting & function

Severity
Blocking some user

Additional context
Maybe related to #1579

@suciptoid
Copy link
Author

Additional info: Bug not occur on Firefox browser.

Maybe related to #1585

@suciptoid
Copy link
Author

Enabling purgecss solve this issue, closed.

Additional info:
I'm try to reproduce with svelte@next template (snowpack) and don't facing this bug.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant