create-react-app安装及使用
-
npm install -g create-react-app
-
create-react-app my-app
蚂蚁金服的ant-mobile UI地址
https://mobile.ant.design/docs/react/use-with-create-react-app-cn
第一步需要引入
npm install babel-plugin-import --save-dev
第二步在package.json中的babel中引入plugins
"babel": {
"presets": [
"react-app"
],
"plugins": [
[
"import",
{
"libraryName": "antd",
"libraryDirectory": "es",
"style": "css"
}
],
"transform-decorators-legacy"
]
},