...
|
...
|
@@ -5,7 +5,7 @@ const devInfo = require('./public/build/dev-info.js'); |
|
|
|
|
|
let assets, sprites;
|
|
|
|
|
|
if (process.env.NODE_ENV === 'production' || 'performance') {
|
|
|
if (process.env.NODE_ENV === 'production' || process.env.NODE_ENV === 'performance') {
|
|
|
assets = {
|
|
|
loadPaths: [path.join(__dirname, './public/img/'), path.join(__dirname, './public/font/')],
|
|
|
basePath: path.join(__dirname, './public/'),
|
...
|
...
|
@@ -62,6 +62,7 @@ module.exports = { |
|
|
},
|
|
|
'postcss-assets': assets,
|
|
|
'postcss-sprites': sprites,
|
|
|
'postcss-calc': {},
|
|
|
'postcss-pxtorem': {
|
|
|
rootValue: 40,
|
|
|
unitPrecision: 5, // 保留5位小数字
|
...
|
...
|
@@ -69,6 +70,9 @@ module.exports = { |
|
|
selectorBlackList: [], // 选择器黑名单,可以使用正则
|
|
|
propWhiteList: [] // 属性名称为空,表示替换所有属性的值
|
|
|
},
|
|
|
'postcss-use': {
|
|
|
modules: ['postcss-clearfix', 'postcss-crip', 'postcss-short', 'postcss-center', 'postcss-position']
|
|
|
},
|
|
|
autoprefixer: {
|
|
|
browsers: ['> 1%', 'android >=4', 'ios >=8']
|
|
|
}
|
...
|
...
|
|