1. yarn add -D react-app-rewired customize-cra

  2. Create a config-overrides. Js file in the root directory.

const { useBabelRc, override } = require('customize-cra')

module.exports = override(
  useBabelRc()
);
Copy the code
  1. Modify thepackage.jsonStart command in:
"scripts": {-"start": "react-scripts start"
+  "start": "react-app-rewired start"
  }
Copy the code