diff --git a/package.json b/package.json index f5fa2a2c..03664fb9 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "lodash": "^4.17.21", "moment-timezone": "^0.5.33", "node-sass": "^4.14.1", + "postcss-plugin-px2rem": "^0.8.1", "postcss-px2rem-exclude": "0.0.6", "sass-loader": "^8.0.2", "sass-resources-loader": "^2.2.1", diff --git a/postcss.config.js b/postcss.config.js index f2c5dd71..dc245384 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,9 +1,11 @@ module.exports = { plugins: { - autoprefixer: {} - /* 'postcss-px2rem-exclude': { - remUnit: 16, - exclude: /node_modules/i - } */ + autoprefixer: {}, + 'postcss-plugin-px2rem': { + rootValue: 16, + exclude: /node_modules/i, + minPixelValue: 3, + selectorBlackList: ['.html', 'iconfont', '.ttf', '.css'] + } } } diff --git a/public/index.html b/public/index.html index 00e4bce2..8032a72d 100644 --- a/public/index.html +++ b/public/index.html @@ -14,15 +14,39 @@