From 9b3ecda853ba9e5995612e794ff97a71ad1b0c14 Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Sun, 31 Oct 2021 13:35:08 +0800 Subject: [PATCH] chore: postcss.config.js --- postcss.config.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/postcss.config.js b/postcss.config.js index 7fab4c6..a106f10 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -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')() + ] }