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

Hot reload with SCSS not working #12211

Closed
melrefaie opened this issue Oct 19, 2021 · 5 comments · Fixed by vitejs/vite#5422
Closed

Hot reload with SCSS not working #12211

melrefaie opened this issue Oct 19, 2021 · 5 comments · Fixed by vitejs/vite#5422
Assignees

Comments

@melrefaie
Copy link

Environment

Nuxt project info:

  • Operating System: Darwin
  • Node Version: v14.18.1
  • Nuxt Version: 3.0.0-27244105.2256b2b
  • Package Manager: npm
  • Bundler: Vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Describe the bug

Hot reload with SCSS not working with the latest version, you need to refresh page to update its css.

Reproduction

You could try this issue here
https://stackblitz.com/edit/nuxt-starter-wmly2m?file=app.vue

  1. npx nuxi init nuxt3-app
  2. npm i -D sass
  3. npm upgrade
  4. try use scss , hot reload not working . only when you refresh page you see your styles updated

Additional context

No response

Logs

No response

@lukaszflorczak
Copy link

I have the same problem.
Nuxt Version: 3.0.0-27244261.c49f9ca.

@nachtfunke
Copy link

So I have the same problem. But it occurred all of a sudden. It used to work just fine up until about two days into the project when it just stopped working.

There is a client console output, saying that there was a css hot updated:, but the changes aren't appearing until reload. There is also sometimes an warning that just doesn't say absolutely anything, that started to appear:

 WARN  [worker] exited with code: 1                                                                                                                                                                 20:35:31

  at Worker.<anonymous> (node_modules/@nuxt/nitro/dist/index.mjs:1712:18)
  at Object.onceWrapper (node:events:510:26)
  at Worker.emit (node:events:402:35)
  at Worker.emit (node:domain:475:12)
  at Worker.[kOnExit] (node:internal/worker:278:10)
  at Worker.<computed>.onexit (node:internal/worker:198:20)

Have you maybe found a workaround in the meantime? @melrefaie

@melrefaie
Copy link
Author

melrefaie commented Oct 24, 2021

So I have the same problem. But it occurred all of a sudden. It used to work just fine up until about two days into the project when it just stopped working.

There is a client console output, saying that there was a css hot updated:, but the changes aren't appearing until reload. There is also sometimes an warning that just doesn't say absolutely anything, that started to appear:

 WARN  [worker] exited with code: 1                                                                                                                                                                 20:35:31

  at Worker.<anonymous> (node_modules/@nuxt/nitro/dist/index.mjs:1712:18)
  at Object.onceWrapper (node:events:510:26)
  at Worker.emit (node:events:402:35)
  at Worker.emit (node:domain:475:12)
  at Worker.[kOnExit] (node:internal/worker:278:10)
  at Worker.<computed>.onexit (node:internal/worker:198:20)

Have you maybe found a workaround in the meantime? @melrefaie

@nachtfunke Yes you can use older version until it fixed

Use this one

  • Nuxt Version: 3.0.0-27242401.b3ff8ee

@antfu @pi0 I think this issue related to fix of #11990

@nachtfunke
Copy link

nachtfunke commented Oct 24, 2021

3-3.0.0-27242401.b3ff8ee

This one doesn't seem to exist. It prompts with a plethora of other versions when trying to install this one, but this specific one is not part of it.

Ignore that. I found the version. Thank you! That fixed my problem!

@antfu
Copy link
Member

antfu commented Oct 26, 2021

Fix on the way vitejs/vite#5422

pi0 referenced this issue in nuxt/framework Oct 27, 2021
@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants