From 596a2544283314f993e225fe7f1f718cf586434e Mon Sep 17 00:00:00 2001 From: silentcloud Date: Wed, 30 Aug 2017 11:40:30 +0800 Subject: [PATCH 1/8] chore: update create-react-app, ref #27 --- create-react-app/.gitignore | 1 - create-react-app/README.md | 5 +- create-react-app/config/env.js | 11 +- create-react-app/config/paths.js | 4 +- create-react-app/config/webpack.config.dev.js | 236 +++++++-------- .../config/webpack.config.prod.js | 279 +++++++++--------- .../config/webpackDevServer.config.js | 6 +- create-react-app/package.json | 86 +++--- create-react-app/public/favicon.ico | Bin 24838 -> 3870 bytes create-react-app/public/index.html | 5 +- create-react-app/scripts/build.js | 30 +- create-react-app/src/App.css | 8 +- create-react-app/src/index.css | 1 - create-react-app/src/index.js | 2 +- create-react-app/src/registerServiceWorker.js | 109 +++++-- 15 files changed, 436 insertions(+), 347 deletions(-) diff --git a/create-react-app/.gitignore b/create-react-app/.gitignore index bb5f2bb..d30f40e 100644 --- a/create-react-app/.gitignore +++ b/create-react-app/.gitignore @@ -19,4 +19,3 @@ npm-debug.log* yarn-debug.log* yarn-error.log* -yarn.lock diff --git a/create-react-app/README.md b/create-react-app/README.md index 650eaa6..240dabe 100644 --- a/create-react-app/README.md +++ b/create-react-app/README.md @@ -32,7 +32,7 @@ First we install antd-mobile and [babel-plugin-import](https://github.com/ant-de ```bash $ yarn add antd-mobile - $ yarn add babel-plugin-import --dev + $ yarn add babel-plugin-import less-loader postcss-pxtorem svg-sprite-loader@0.3.1 --dev ``` 1. Modify `config/webpack.config.dev.js` @@ -45,6 +45,7 @@ First we install antd-mobile and [babel-plugin-import](https://github.com/ant-de exclude: [ ... /\.less$/, + /\.svg$/, ... ] }, @@ -109,4 +110,4 @@ First we install antd-mobile and [babel-plugin-import](https://github.com/ant-de if(!window.Promise) { document.writeln('