😊

[Nuxt3] enable Hot Reload

2024/07/10に公開
  • Environment
    node: v20.15.1
    nuxt: 3.12.3
    os: windows11

setting for HMR(Hot Module Reload)

add vite-setting to "nuxt.config.ts"

nuxt.config.ts
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  compatibilityDate: '2024-04-03',
  devtools: { enabled: true },

  vite:{
    server: {
      watch: {
        usePolling: true,
      },
    },
  },

})

Discussion