Skip to content

Commit a5daeec

Browse files
committed
Add diagnostic for @tailwind base / preflight
1 parent e9a1937 commit a5daeec

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/tailwindcss-language-service/src/diagnostics/getInvalidTailwindDirectiveDiagnostics.ts

+9
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,15 @@ function validateLayerName(
8888
suggestions: [],
8989
}
9090
}
91+
92+
// `@tailwind base | preflight` do not exist in v4
93+
if (layerName === 'base' || layerName === 'preflight') {
94+
return {
95+
message: `'@tailwind ${layerName}' is no longer available in v4. Use '@import "tailwindcss/base"' instead.`,
96+
suggestions: [],
97+
}
98+
}
99+
91100
let parts = layerName.split(/\s+/)
92101

93102
// `@tailwind utilities source(…)` is valid

0 commit comments

Comments
 (0)