postcss / autoprefixer

Parse CSS and add vendor prefixes to rules by Can I Use
https://twitter.com/autoprefixer
MIT License
21.57k stars 1.25k forks source link

feat: Show warning message if the user using browserslist config and `overrdeBrowserslist` option #1488

Closed arayaryoma closed 1 year ago

arayaryoma commented 1 year ago

This PR introduces a new warning message for users. When the project using Autoprefixer has .browserslistrc (or browserslist field in package.json) and the user specify overrideBrowserslist option for autoprefixer, display a waring message to inform the config will be overridden.

This may help users to avoid accidentally overriding .browserslistrc.

images

image
ai commented 1 year ago

What if user need to use Autoprefixer with another options? (For example to clean all prefixes)

arayaryoma commented 1 year ago

This warning message will be shown only when using overrideBrowserslist, so this change doesn't affect to any other options. ( I'm sorry if my understand was wrong about your concern. )

ai commented 1 year ago

To clean some sources from prefixes I will use overrideBrowserslist too.

Sorry, this warning will have too many false-positive errors.

arayaryoma commented 1 year ago

That makes sense. thanks!