Skip to content

Commit

Permalink
fix(postcss): postcss dependency should always be added (#4161)
Browse files Browse the repository at this point in the history
  • Loading branch information
9aoy authored Sep 28, 2024
1 parent f21efd5 commit 19bc9c7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/postcss/src/esm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,20 +136,20 @@ export function createPlugin(options: UnoPostcssPluginOptions) {
for (let i = 0; i < entries.length; i += BATCH_SIZE) {
const batch = entries.slice(i, i + BATCH_SIZE)
promises.push(...batch.map(async (file) => {
const { mtimeMs } = await stat(file)

if (fileMap.has(file) && mtimeMs <= fileMap.get(file))
return

fileMap.set(file, mtimeMs)

result.messages.push({
type: 'dependency',
plugin: directiveMap.unocss,
file: normalize(file),
parent: from,
})

const { mtimeMs } = await stat(file)

if (fileMap.has(file) && mtimeMs <= fileMap.get(file))
return

fileMap.set(file, mtimeMs)

const content = await readFile(file, 'utf8')
const { matched } = await uno.generate(content, {
id: file,
Expand Down

0 comments on commit 19bc9c7

Please sign in to comment.