I'm following the instructions in this section of 2.0 docs to use antd-mobile with create-react-app. But I can't figure out how theme customization will work with react-app-rewired. The doc doesn't seem to cover this.
Any suggestion?
I will add this in https://github.com/ant-design/antd-mobile-samples/tree/master/create-react-app later @blooddrunk
Thanks. That'll be of great help
How to edit Less variables in create-react-app?
I tried that the 'modifyVars' method that seems do not work in the Mobile version.
@max8hine see https://mobile.ant.design/docs/react/customize-theme
@silentcloud thank you for the reply.
I think I didn't describe my question clearly, sorry about that.
My issue is how to change the variables in default.less with the create-react-app project.
In the customize-theme link, only taught how to do it with webpack.
In the antd-mobile-samples link, only taught how to load less in create-react-app.
Thank you.
@max8hine If you use create-react-app with react-app-rewired, you can see https://github.com/ant-design/antd-mobile-samples/blob/master/create-react-app/config-overrides.js#L46, find the theme variables which you want to change in default.less, then add them in modifyVars and change the value
@silentcloud Thanks a million, I did not check the code in that project, that's my fault =)
react-app-rewired not working with react-scripts 2.1.2
The readme steps for antd with create-reat-app is failing
Most helpful comment
react-app-rewired not working with react-scripts 2.1.2
The readme steps for antd with create-reat-app is failing