Skip to content

Commit

Permalink
fix: using watch in nuxt3 error
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Nov 6, 2022
1 parent c78425d commit a2d0fd5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/nuxt-windicss/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export default defineNuxtModule<ModuleOptions>({
clearRequireCache(configFilePath)
configType = `./${relative(nuxtOptions.rootDir, configFilePath)}`
// Restart Nuxt if windi file updates (for modules using windicss:config hook)
if (nuxt.options.dev)
if (nuxt.options.dev && nuxt.options.watch)
nuxt.options.watch.push(configFilePath)
}

Expand All @@ -172,7 +172,7 @@ export default defineNuxtModule<ModuleOptions>({
if (!filepath || !config)
return

if (nuxt.options.dev)
if (nuxt.options.dev && nuxt.options.watch)
nuxt.options.watch.push(filepath)
// fix recursion
// delete config.plugins
Expand Down

0 comments on commit a2d0fd5

Please sign in to comment.