Last active
November 13, 2018 19:13
-
-
Save ndbroadbent/f7d6a343c5f4976ef4f8fa10a8595bad to your computer and use it in GitHub Desktop.
create-react-app configuration using craco, for ant.design, Less loader for custom theming, and preact-compat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// UPDATE: I released a craco plugin as an NPM package: https://github.com/ndbroadbent/craco-antd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use the craco tool to configure create-react-app without ejecting.
This is thecraco.config.js
configuration file I'm using for ant.design. I followed the Ant Design docs to set up the babel-import-plugin. I also set up the Less loader, so that I could customize the Ant Design theme, and also to use my own less files. (Code taken from this craco issue.)I released this as an installable plugin: https://github.com/ndbroadbent/craco-antd