Skip to content
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

Nuxt3 + vanilla extract, issue with HMR when SSR is enabled #1118

Open
2 tasks done
Hecatron opened this issue Jun 9, 2023 · 3 comments
Open
2 tasks done

Nuxt3 + vanilla extract, issue with HMR when SSR is enabled #1118

Hecatron opened this issue Jun 9, 2023 · 3 comments
Labels
vite Issue related to vite

Comments

@Hecatron
Copy link

Hecatron commented Jun 9, 2023

Describe the bug

I've recently had another look at using vanilla extract for use with Nuxt3.
It appears mostly fine although it looks as if HMR doesn't work if SSR is enabled for the site

I've noticed that vite / nuxt is detecting a change and reloading the page
but it's just not showing up even with a full manual page refresh.
Disabling SSR across the entire nuxt app seems to work, but prevents it from being used with themes such as docus.
I've tested this on both Windows 10 and a Rpi running raspian and the results are the same so I don't think it's an issue unique to windows pathing.

Reproduction

https://github.com/Hecatron-Forks/vanilla-extract-example

System Info

windows:

  System:
    OS: Windows 10 10.0.19045
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz
    Memory: 2.27 GB / 15.68 GB
  Binaries:
    Node: 19.8.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 9.1.3 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (114.0.1823.41)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    @vanilla-extract/css: ^1.11.1 => 1.11.1
    @vanilla-extract/vite-plugin: ^3.8.2 => 3.8.2

Rpi / Raspian:

System:
    OS: Linux 6.1 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (4) arm64 Cortex-A72
    Memory: 7.20 GB / 7.63 GB
    Container: Yes
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 20.0.0 - /usr/local/bin/node
    npm: 9.6.4 - /usr/local/bin/npm
  Browsers:
    Firefox: 102.12.0esr
  npmPackages:
    @vanilla-extract/css: ^1.11.1 => 1.11.1
    @vanilla-extract/vite-plugin: ^3.8.2 => 3.8.2

Used Package Manager

pnpm

Logs

I'm not seeing any errors in the console

Validations

@Hecatron
Copy link
Author

Hecatron commented Jun 9, 2023

I've also tried the emitCssInSsr: true option but that doesn't seem to help
It'll only refresh if nuxt does a full on reload of the development server (such as when editing the nuxt.config.ts)

@graup
Copy link
Collaborator

graup commented Jul 4, 2023

I can reproduce this issue. And setting ssr: false indeed makes it work. @mattcompiles @markdalgleish any ideas? Could this be a Vite plugin issue? Or more likely to be a Nuxt issue?

@askoufis
Copy link
Contributor

askoufis commented Mar 2, 2024

Thought this might have been fixed by the latest version of the vite plugin (4.0.4 at time or writing), but it's still showing the same issue :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vite Issue related to vite
Projects
None yet
Development

No branches or pull requests

3 participants