Skip to content

Commit

Permalink
Add diagnostic for @tailwind base / preflight
Browse files Browse the repository at this point in the history
  • Loading branch information
thecrypticace committed Nov 8, 2024
1 parent e9a1937 commit a5daeec
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@ function validateLayerName(
suggestions: [],
}
}

// `@tailwind base | preflight` do not exist in v4
if (layerName === 'base' || layerName === 'preflight') {
return {
message: `'@tailwind ${layerName}' is no longer available in v4. Use '@import "tailwindcss/base"' instead.`,
suggestions: [],
}
}

let parts = layerName.split(/\s+/)

// `@tailwind utilities source(…)` is valid
Expand Down

0 comments on commit a5daeec

Please sign in to comment.