From 5685b51b35439fe7ae49b088f8bfab45d337de27 Mon Sep 17 00:00:00 2001 From: Baiang <973366510@qq.com> Date: Tue, 17 Jul 2018 18:46:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Epostcss-import=E3=80=81postcs?= =?UTF-8?q?s-url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 5 ++++- postcss.config.js | 9 ++++++--- src/pages/index.jsx | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index bb3febd..e9c17f8 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,8 @@ "jest-transform-stub": "^1.0.0", "next-compose-plugins": "^2.1.1", "open-browser-webpack-plugin": "^0.0.5", + "postcss-import": "^11.1.0", + "postcss-url": "^7.3.2", "react-addons-test-utils": "15.6.2", "react-test-renderer": "16.2.0", "styled-jsx-plugin-sass": "^0.2.4", @@ -67,6 +69,7 @@ }, "browserslist": [ "> 1%", - "last 2 versions" + "last 2 versions", + "not ie <= 8" ] } diff --git a/postcss.config.js b/postcss.config.js index 49d35a8..b5bdfdd 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,5 +1,8 @@ module.exports = { - plugins: [ - require('autoprefixer')({ browsers: ['last 20 versions', 'Android >= 2.0'] }) - ] + "plugins": { + "postcss-import": {}, + "postcss-url": {}, + // to edit target browsers: use "browserslist" field in package.json + "autoprefixer": {} + } } diff --git a/src/pages/index.jsx b/src/pages/index.jsx index 7db45d6..dfd0785 100644 --- a/src/pages/index.jsx +++ b/src/pages/index.jsx @@ -30,7 +30,7 @@ class Index extends Component { } render () { return ( - +