Implement ant-design (antd) in create-react-app
See original GitHub issueHi guys.
As you may know, ant-design is being sort of popular in these last days, but the implementation require eject
CRA
if you want to implement it in the best performant way.
More info:
- https://ant.design/docs/react/use-with-create-react-app
- https://ant.design/docs/react/getting-started#Import-on-Demand
Is there a way to implement ant-design, with no ejecting CRA
?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:25 (11 by maintainers)
Top Results From Across the Web
Use in create-react-app - Ant Design
create -react-app is one of the best React application development tools. We are going to use antd within it and modify the webpack...
Read more >Use in create-react-app - Ant Design
create -react-app is one of the best React application development tools. We are going to use antd within it and modify the webpack...
Read more >Use in create-react-app - Ant Design Landing
create -react-app is one of the best tools for React development in the industry. This article shows how to use Ant Design Landing...
Read more >Getting Started - Ant Design
Ant Design React is dedicated to providing a good development experience for programmers. Before starting, it is recommended to learn React and ES2015...
Read more >Ant Design of React
Import in Browser ... Add script and link tags in your browser and use the global variable antd . ... , or unpkg....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t understand why Ant docs recommend ejecting and using the Babel plugin. If I understand it right, you don’t need to eject to use Ant—you can import components one by one:
This should work with Create React App.
cc @afc163, would you be willing to amend the docs to recommend this approach for CRA integration rather than ejecting? It’s unfortunate when libraries prescribe people to change their build process.
See example less theme here: https://github.com/MrLoh/nextjs-cms/blob/master/static/antd-theme.less
Which is compile with
lessc --clean-css static/antd-theme.less static/antd.min.css
You’d have to adjust the directory structure of course in create React app.