Skip to content

Commit

Permalink
chore(tw-support): get cssPath from array (#2501)
Browse files Browse the repository at this point in the history
  • Loading branch information
ineshbose authored Jan 25, 2024
1 parent 3195944 commit c15ee5c
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 @@ -834,7 +834,8 @@ export default defineNuxtModule<ModuleOptions>({
}

// @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')
}
Expand Down

0 comments on commit c15ee5c

Please sign in to comment.