
本文共 1399 字,大约阅读时间需要 4 分钟。
���������������������������������create-react-app ������������������������������������ npm run eject ������������������������������������������
������������������
������������������������������Ant Design���
������������Ant Design
���������npm install antd-mobile --save
��� src/index.js ���������Ant Design������������������
import 'antd-mobile/dist/antd-mobile.css';
������������������������Ant Design������������
import React from 'react'; import { Button } from 'antd-mobile'; function App() { return (
- ������������������������
������������������������������������
npm install react-app-rewired customize-cra --save-dev npm install babel-plugin-import --save-dev
������������������package.json������������������
{ "scripts": { "start": "react-app-rewired start", "build": "react-app-rewired build", "test": "react-app-rewired test --env=jsdom", "eject": "react-scripts eject" } }
��������������������������������������������������� config-overrides.js ���������
const { override, fixBabelImports } = require('customize-cra'); module.exports = override( fixBabelImports('import', { libraryName: 'antd-mobile', style: 'css', }) );
������ src/index.js ���������������������������������
������������������������
import 'antd-mobile/dist/antd-mobile.css';
发表评论
最新留言
关于作者
