Skip to content

Commit

Permalink
fix: normalise undefined nuxt.options.watch (#553)
Browse files Browse the repository at this point in the history
  • Loading branch information
DamianGlowala committed Oct 28, 2022
1 parent 3f835bd commit 5b373c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ export default defineNuxtModule<ModuleOptions>({

// Watch the Tailwind config file to restart the server
if (nuxt.options.dev) {
nuxt.options.watch = nuxt.options.watch || []
configPaths.forEach(path => nuxt.options.watch.push(path))
}

Expand Down Expand Up @@ -143,7 +144,7 @@ export default defineNuxtModule<ModuleOptions>({
getContents: () => `module.exports = ${JSON.stringify(resolvedConfig, null, 2)}`,
write: true
})

// Expose resolved tailwind config as an alias
// https://tailwindcss.com/docs/configuration/#referencing-in-javascript
if (moduleOptions.exposeConfig) {
Expand Down

0 comments on commit 5b373c6

Please sign in to comment.