報錯Replace Autoprefixer browsers option to Browserslist config.


問題描述:
Copy
Replace Autoprefixer browsers option to Browserslist config.
Use browserslist key in package.json or .browserslistrc file.
Using browsers option cause some error. Browserslist config
can be used for Babel, Autoprefixer, postcss-normalize and other tools.
If you really need to use option, rename it to overrideBrowserslist.
因為postCss版本更新,之前版本的配置已無效:

Copy
module.exports = {
plugins: [
require('autoprefixer')({
browsers: ['last 100 versions']
})// 自動添加css前綴
]
}
更換為:

Copy
module.exports = {
plugins: [
require('autoprefixer')({overrideBrowserslist: ['> 0.15% in CN']})// 自動添加css前綴
]
}
即可解決


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM