Skip to content

Commit 7eb5343

Browse files
committed
fix: use unshift instead of push into nuxt.options.css
1 parent e94c94a commit 7eb5343

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/import-css.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default async function importCSS(nuxt = useNuxt()) {
2020
write: true,
2121
})
2222

23-
const analyzedFiles = await Promise.all([...new Set([...resolvedCSSFiles, ...defaultCSSFiles])].map(async (file) => {
23+
const analyzedFiles = await Promise.all([...new Set([...defaultCSSFiles, ...resolvedCSSFiles])].map(async (file) => {
2424
const fileContents = await readFile(file, { encoding: 'utf-8' }).catch(() => '')
2525
return [file, { hasImport: IMPORT_REGEX.test(fileContents), isInNuxt: resolvedCSSFiles.includes(file) }] as const
2626
}))
@@ -40,7 +40,7 @@ export default async function importCSS(nuxt = useNuxt()) {
4040
: filesImportingTailwind.find(file => file[1].isInNuxt) || filesImportingTailwind.pop()!
4141

4242
if (!isInNuxt) {
43-
nuxt.options.css.push(file)
43+
nuxt.options.css.unshift(file)
4444
}
4545

4646
nuxt.options.alias['#tailwind'] = file

0 commit comments

Comments
 (0)