autoprefixer pit does not work

Outline

Today, colleagues said, nuxt.js project does not seem to automatically add a prefix, it took me a long time to find out the reasons, and finally discovered that there is no increase .browserslistrc file . . . Recorded during a reference for future development, we believe it is useful to others.

browserslistrc

Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-preset-env

As indicated above browserslist effect, is used to define the scope of supported browser , which has a role in many of the tool, such Autoprefixer, Stylelint and babel-preset-env.

autoprefixer

autoprefixer official website clearly states that this plugin requires browserslistrc to work, and the configuration browserslistrc There are two ways, one is to use .browserslistrc file , and the other one is directly in the package.jsonconfiguration inside .

Guess you like

Origin www.cnblogs.com/yangzhou33/p/11355169.html