Installation
To get started, first create a new application using create-react-app.
npx create-react-app my-app
cd my-app
Once your project is created, you can install react-app-rewired. The version you should install depends on the version of create-react-app and react-scripts you are using.
For Create React App 2.x (or higher)
If your project uses react-scripts version 2.1.3 or higher (which includes Webpack 4), install the latest version of react-app-rewired:
npm install react-app-rewired --save-dev
# or
yarn add react-app-rewired --dev
This is the recommended version for all new projects.
For Create React App 1.x
If you are working with an older project that uses react-scripts version 1.x (which includes Webpack 3), you must install a specific version of react-app-rewired:
npm install react-app-rewired@1.6.2 --save-dev
# or
yarn add react-app-rewired@1.6.2 --dev
After installation, proceed to the Quick Start guide to configure your project.