Skip to content

Commit

Permalink
fix: css option in object format error. (#557)
Browse files Browse the repository at this point in the history
Co-authored-by: Sébastien Chopin <seb@nuxtjs.com>
  • Loading branch information
mena234 and Atinux committed Nov 3, 2022
1 parent 90696c5 commit 2408a1e
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 @@ -189,7 +189,8 @@ export default defineNuxtModule<ModuleOptions>({
resolvedCss = createResolver(import.meta.url).resolve('runtime/empty.css')
}
nuxt.options.css = nuxt.options.css ?? []
const resolvedNuxtCss = await Promise.all(nuxt.options.css.map(p => resolvePath(p)))

const resolvedNuxtCss = await Promise.all(nuxt.options.css.map((p: any) => resolvePath(p.src ?? p)))

// Inject only if this file isn't listed already by user (e.g. user may put custom path both here and in css):
if (!resolvedNuxtCss.includes(resolvedCss)) {
Expand Down

0 comments on commit 2408a1e

Please sign in to comment.