Skip to content

Commit

Permalink
feat(wp-runner): postcss单位转换插件配置
Browse files Browse the repository at this point in the history
  • Loading branch information
Simbachen committed Jun 11, 2018
1 parent 6997c4b commit 1f14d20
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/taro-webpack-runner/src/config/postcss.conf.js
Expand Up @@ -18,15 +18,16 @@ exports.getPostcssPlugins = function (config) {
const useModuleConf = config.module || {}
const customPostcssConf = useModuleConf.postcss || {}
const customAutoprefixerConf = customPostcssConf.autoprefixer || {}
const customPxtransformConf = customPostcssConf.pxtransform || {}
const customPlugins = customPostcssConf.plugins || []
if (isEmptyObject(customAutoprefixerConf) || customAutoprefixerConf.enable) {
plugins.push(autoprefixer(Object.assign({}, defaultAutoprefixerConf, customAutoprefixerConf)))
}

plugins.push(pxtransform({
plugins.push(pxtransform(Object.assign({}, customPxtransformConf, {
designWidth,
platform: 'h5'
}))
})))

plugins.push(constparse({
constants: [{
Expand Down

0 comments on commit 1f14d20

Please sign in to comment.