Skip to content

Commit

Permalink
fix: don't watch tailwind config if object
Browse files Browse the repository at this point in the history
  • Loading branch information
Jank1310 committed Aug 31, 2022
1 parent c07cab7 commit ec16e2f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/commands/serve.js
Expand Up @@ -38,11 +38,15 @@ const serve = async (env = 'local', config = {}) => {
templates = Array.isArray(templates) ? templates : [templates]

const templatePaths = [...new Set(templates.map(config => `${get(config, 'source', 'src')}/**`))]
const tailwindConfig = get(config, 'build.tailwind.config', 'tailwind.config.js')
const globalPaths = [
'src/**',
get(config, 'build.tailwind.config', 'tailwind.config.js'),
...new Set(get(config, 'build.browsersync.watch', []))
]
const isTailwindConfigPath = !isObject(tailwindConfig)
if(isTailwindConfigPath) {
globalPaths.push(tailwindConfig);
}

// Watch for Template file changes
browsersync()
Expand Down

0 comments on commit ec16e2f

Please sign in to comment.