post css 基本使用
webpack & post css
- 安裝postcss - npm i postcss
- 安裝postcss-loader並且在webpack.config.js中設定loader - https://github.com/webpack-contrib/postcss-loader。
- 安裝postcss外掛並且依照外掛文檔配置postcss.config.js ,例如: https://github.com/postcss/autoprefixer#webpack。
- 補充:如果要使用某些插件例如:autoprefixer插件,記得要搭配上browserlist明確指示要加上哪些前綴 - https://github.com/browserslist/browserslist
- 配置.browserlistrc檔案