From c15ee5cd0d725b8bb08d41f3046ccbbb30275d6d Mon Sep 17 00:00:00 2001 From: Inesh Bose Date: Thu, 25 Jan 2024 13:45:05 +0000 Subject: [PATCH] chore(tw-support): get cssPath from array (#2501) --- src/module.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/module.ts b/src/module.ts index 01c912894..248e582f7 100644 --- a/src/module.ts +++ b/src/module.ts @@ -834,7 +834,8 @@ export default defineNuxtModule({ } // @ts-ignore - let cssPath = nuxt.options.tailwindcss?.cssPath ? await resolvePath(nuxt.options.tailwindcss?.cssPath, { extensions: ['.css', '.sass', '.scss', '.less', '.styl'] }) : join(nuxt.options.dir.assets, 'css/tailwind.css') + const [tailwindCssPath] = Array.isArray(nuxt.options.tailwindcss?.cssPath) ? nuxt.options.tailwindcss?.cssPath : [nuxt.options.tailwindcss?.cssPath] + let cssPath = tailwindCssPath ? await resolvePath(tailwindCssPath, { extensions: ['.css', '.sass', '.scss', '.less', '.styl'] }) : join(nuxt.options.dir.assets, 'css/tailwind.css') if (!fs.existsSync(cssPath)) { cssPath = await resolvePath('tailwindcss/tailwind.css') }