ant-design / create-react-app-antd

Use antd in create-react-app without ejecting ✨
https://ant.design/docs/react/use-with-create-react-app
583 stars 197 forks source link

Polyfills Best Practices #13

Open richardzyx opened 6 years ago

richardzyx commented 6 years ago

Hi all, it seems that there's no documentation on how to do polyfills with antd for create-react-app? I found some basic setup in the ant-design-pro src/index.js file but not sure which ones are absolute necessary. Thanks!

ghost commented 6 years ago

There is a good way to modify create-react-app's internal webpack configurations - react-app-rewired.

I made a module inspired by this project to rewire antd into create-react-app APP - react-app-rewire-antd. Maybe this is what you need.

richardzyx commented 6 years ago

Ah yes that's a very helpful reference with instructions. Thanks!