Skip to content
Discussion options

You must be logged in to vote

Vite does not currently have a built-in Browserslist-based CSS compatibility lint. build.cssTarget controls CSS output/minification transformations; it is not an authoring-time compatibility checker.

For warnings, run Stylelint separately with stylelint-no-unsupported-browser-features:

npm add -D stylelint stylelint-no-unsupported-browser-features
{
  "plugins": ["stylelint-no-unsupported-browser-features"],
  "rules": {
    "plugin/no-unsupported-browser-features": [
      true,
      { "severity": "warning" }
    ]
  }
}

The rule uses the project's browserslist configuration automatically. It is best kept at warning severity because it cannot detect whether you supplied a fallback.

Sour…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by npanuhin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants