feat: add postcss.config.js

This commit is contained in:
fxy060608 2021-09-15 20:24:18 +08:00
parent 24c1ec6b36
commit e6a494f6d5
2 changed files with 22 additions and 6 deletions

View File

@ -20,8 +20,8 @@
"@dcloudio/uni-i18n": "^3.0.0-alpha-3000020210831001",
"@dcloudio/uni-shared": "^3.0.0-alpha-3000020210831001",
"@dcloudio/uni-stat": "^3.0.0-alpha-3000020210831001",
"@vue/shared": "^3.2.6",
"vue": "^3.2.6",
"@vue/shared": "^3.2.11",
"vue": "^3.2.11",
"vue-i18n": "^9.1.7",
"vue-router": "^4.0.11",
"vuex": "^4.0.2"
@ -34,9 +34,10 @@
"@dcloudio/uni-cli-shared": "^3.0.0-alpha-3000020210831001",
"@dcloudio/uni-h5-vite": "^3.0.0-alpha-3000020210831001",
"@dcloudio/vite-plugin-uni": "^3.0.0-alpha-3000020210831001",
"@vitejs/plugin-vue": "^1.6.0",
"@vue/compiler-sfc": "^3.2.6",
"@vue/server-renderer": "^3.2.6",
"vite": "2.5.1"
"@vitejs/plugin-vue": "^1.6.2",
"@vue/compiler-sfc": "^3.2.11",
"@vue/server-renderer": "^3.2.11",
"autoprefixer": "^10.3.4",
"vite": "^2.5.7"
}
}

15
postcss.config.js Normal file
View File

@ -0,0 +1,15 @@
const {
uniPostcssPlugin,
parseRpx2UnitOnce,
} = require('@dcloudio/uni-cli-shared')
module.exports = {
plugins: [
uniPostcssPlugin(
Object.assign(
{ page: process.env.UNI_PLATFORM === 'h5' ? 'uni-page-body' : 'body' },
parseRpx2UnitOnce(process.env.UNI_INPUT_DIR)
)
),
require('autoprefixer')(),
],
}