From ec16e2f109955f8565528af10a1b9f7c7173da7b Mon Sep 17 00:00:00 2001 From: Jan Date: Wed, 31 Aug 2022 16:54:09 +0200 Subject: [PATCH] fix: don't watch tailwind config if object --- src/commands/serve.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/commands/serve.js b/src/commands/serve.js index 5739f02e..9ca91aa1 100644 --- a/src/commands/serve.js +++ b/src/commands/serve.js @@ -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()