[Operation class-React] React NutUI project loads styles on demand

1. Initialize a react project

2. NutUI Installation Guide  NutUI - Mobile React Component Library

npm i @nutui/nutui-react

 install craco

npm i --save-dev @craco/craco
npm i --save-dev sass
npm i --save-dev babel-plugin-import

Create a new craco.config.js in the root directory. For detailed code, see Add craco configuration in the guide

Introduce a button test in App.js and find an error 

Change the scripts configuration item in package.json to

 run successfully

 

Guess you like

Origin blog.csdn.net/Weiqian_/article/details/131042258