problem description
I created a hello-world project using vue-cli version 3.0:
vue create hello-world
//
I found that it enabled the service
by using vue serve
.
now I want to join postcss, and find that the pkg.json
generated by it has already written this configuration:
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
this is not like the webpack configuration I used earlier.
how do I configure postcss, now if I want to join it? Does
still need to be configured in the same way as the original webpack?
related codes
/ / Please paste the code text below (do not replace the code with pictures)
this is the pkg.json content after the project is created:
{
"name": "hello-world",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"vue": "^2.5.16"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.0.0-rc.9",
"@vue/cli-plugin-eslint": "^3.0.0-rc.9",
"@vue/cli-service": "^3.0.0-rc.9",
"vue-template-compiler": "^2.5.16"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"rules": {},
"parserOptions": {
"parser": "babel-eslint"
}
},
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
Thank you!