-
yarn add -D react-app-rewired customize-cra
-
Create a config-overrides. Js file in the root directory.
const { useBabelRc, override } = require('customize-cra')
module.exports = override(
useBabelRc()
);
Copy the code
- Modify the
package.json
Start command in:
"scripts": {-"start": "react-scripts start"
+ "start": "react-app-rewired start"
}
Copy the code