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

fix: normalise undefined nuxt.options.watch #553

Merged
merged 2 commits into from
Oct 28, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 ?? []
DamianGlowala marked this conversation as resolved.
Show resolved Hide resolved
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