Currently, the CLI uses Autoprefixer to ensure compatibility with different browser and browser versions. You may find it necessary to target specific browsers or exclude certain browser versions from your build.
Internally, Autoprefixer relies on a library called Browserslist to figure out which browsers to support with prefixing.
There are a few ways to tell Autoprefixer what browsers to target:
"browserslist": [
"> 1%",
"last 2 versions"
]
### Supported Browsers
> 1%
last 2 versions
Autoprefixer will look for the configuration file/property to use when it prefixes your css. Check out the browserslist repo for more examples of how to target specific browsers and versions.
Side note: Those who are seeking to produce a progressive web app and are using Lighthouse to grade the project will need to add the following browserslist config to their package.json file to eliminate the old flexbox prefixes:
package.json
config:
"browserslist": [
"last 2 versions",
"not ie <= 10",
"not ie_mob <= 10"
]