Answer the question
In order to leave comments, you need to log in
Vue-cli how to set up postcss?
1. I create a project through Vue-cli using the webpack template
2. What do I want to get? ---- Write styles in SASS using PostCSS
3. I create a styles folder and put all my sass styles there (one main file includes all files with styles through the include)
4. Then I include this file in main.js. Like this
5. I set this config in the .postcssrc.js fileimport styles from './style.css';
module.exports = {
"syntax": 'postcss-scss',
"plugins": {
"postcss-import": {},
"postcss-url": {},
// to edit target browsers: use "browserslist" field in package.json
"autoprefixer": {}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question