plugins
来源:3-7 antd-mobile 组件使用

Jaiden
2017-11-05
"babel": {
"presets": [
"react-app"
],
"plugins":[
["import", { "libraryName": "antd", "style": "css" }]
]
},
"devDependencies": {
"babel-plugin-import": "^1.6.2",
"react-app-rewire-less": "^2.0.9"
}
// 去掉了import 'antd-mobile/dist/antd-mobile.css'
// antd的样式就不生效,
怎么回事?
3回答
-
你重新执行一下 Npm start 如果还不行的话,代码上传下 我看下
052017-11-05 -
Jaiden
提问者
2017-11-05
其实我啥也没有做就是
0. npm run eject
1. npm install antd-mobile --save
2. npm install babel-plugin-import --dev
3. 在APP.js 里的引入 import { Button } from 'antd-mobile';
4. 将APP.js 里的 这句话code 换成了Button
To get started, edit <Button type="primary"> src/App.js </Button> and save to reload.
?现在的情况是有 import 'antd-mobile/dist/antd-mobile.css' 样式, 没有就没有样式?
很奇怪?????求解?
00 -
蜻蜓01
2017-11-05
重新npm start一次,才会加载新的package.json配置
012017-11-05
Redux+React Router+Node.js全栈开发
1822 学习 · 750 问题
相似问题