Skip to content

Commit 03ffa45

Browse files
committed
a CSS file cannot be a dependency of itself
1 parent 125c57b commit 03ffa45

File tree

1 file changed

+6
-1
lines changed
  • packages/@tailwindcss-postcss/src

1 file changed

+6
-1
lines changed

packages/@tailwindcss-postcss/src/index.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,15 @@ function tailwindcss(opts: PluginOptions = {}): AcceptedPlugin {
211211
DEBUG && I.start('Register dependency messages')
212212
// Add all found files as direct dependencies
213213
for (let file of context.scanner.files) {
214+
let absolutePath = path.resolve(file)
215+
// The CSS file cannot be a dependency of itself
216+
if (absolutePath === result.opts.from) {
217+
continue
218+
}
214219
result.messages.push({
215220
type: 'dependency',
216221
plugin: '@tailwindcss/postcss',
217-
file: path.resolve(file),
222+
file: absolutePath,
218223
parent: result.opts.from,
219224
})
220225
}

0 commit comments

Comments
 (0)