chore: postcss.config.js

This commit is contained in:
fxy060608 2021-10-31 13:35:08 +08:00
parent 47d3203d4c
commit 9b3ecda853

View File

@ -1,15 +1,22 @@
const {
uniPostcssPlugin,
parseRpx2UnitOnce,
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)
{
page:
process.env.UNI_PLATFORM === 'h5'
? 'uni-page-body'
: process.env.UNI_PLATFORM === 'app'
? 'body'
: ''
},
parseRpx2UnitOnce(process.env.UNI_INPUT_DIR, process.env.UNI_PLATFORM)
)
),
require('autoprefixer')(),
],
require('autoprefixer')()
]
}