bridge icon indicating copy to clipboard operation
bridge copied to clipboard

HMR does not work on pages/components with style block when vite is disabled

Open k-urtica opened this issue 3 years ago • 0 comments

Environment


  • Operating System: Windows_NT
  • Node Version: v16.16.0
  • Nuxt Version: 2.16.0-27720022.54e852f
  • Nitro Version: 0.5.3
  • Package Manager: [email protected]
  • Builder: webpack
  • User Config: bridge, target, head, css, plugins, components, buildModules, modules, build, serverHandlers, devServerHandlers
  • Runtime Modules: -
  • Build Modules: (), @nuxt/[email protected]

Reproduction

This is the smallest project immediately after it was created with create nuxt app and migrated to bridge. https://github.com/k-urtica/nuxt-bridge-test

  1. yarn dev
  2. change h1 tag string in index.vue

You can confirm that the changes are not reflected.

Describe the bug

With vite disabled in nuxt.config and <style></style> block present, HMR does not work and changes are not reflected when pages or components are modified.

Additional context

Oddly enough, the HMR seems to work correctly for pages or components without <style></style> blocks. Also, when vite is enabled, HMR seems to work correctly with or without style block.

Logs

No response

k-urtica avatar Sep 17 '22 16:09 k-urtica