Skip to content

Latest commit

 

History

History
48 lines (41 loc) · 925 Bytes

create.md

File metadata and controls

48 lines (41 loc) · 925 Bytes

create project

生成项目并支持自定义配置

create-react-app homenvi-front
yarn add react-app-rewired customize-cra --dev

edit package.json replace all react-scripts to react-app-rewired add config-overrides.js

ant design和按需加载

yarn add antd
yarn add babel-plugin-import --dev

add fixBabelImports(...) in config-overrides.js

less

yarn add less@2 less-loader

add addLessLoader(...) in config-overrides.js

redux and it's devtools

yarn add react-redux redux redux-thunk
yarn add redux-devtools-extension --dev

react-router

yarn add react-router-dom

bootstrap

yarn add bootstrap popper.js

decorators support

yarn add @babel/plugin-proposal-decorators

add addDecoratorsLegacy(...) in config-overrides.js to support decorators

echarts support

yarn add echarts echarts-for-react