@craco/craco
Version:
Create React App Configuration Override, an easy and comprehensible configuration layer for create-react-app.
51 lines (36 loc) • 2.23 kB
Markdown
<div align="center">
<a href="https://craco.js.org">
<img src="https://craco.js.org/img/craco.png" width="200" height="200">
</a>
<h1>CRACO</h1>
<p>
**C**reate **R**eact **A**pp **C**onfiguration **O**verride, an easy and comprehensible configuration layer for create-react-app.
**Find config docs, API docs, plugins, and example configs at [craco.js.org](https://craco.js.org)!**
</p>
<br>
[](https://www.npmjs.com/package/@craco/craco) [](https://www.npmjs.com/package/@craco/craco) [](https://github.com/dilanx/craco/blob/main/packages/craco/LICENSE) [](https://github.com/dilanx/craco) [](https://github.com/dilanx/craco/graphs/contributors) [](https://github.com/dilanx/craco/pulls)
</div>
Get all the benefits of [Create React App](https://create-react-app.dev) **and** customization without using 'eject' by adding a single configuration (e.g. `craco.config.js`) file at the root of your application and customize your ESLint, Babel, PostCSS configurations and many more.
1. Install the latest version of the package from npm as a dev dependency:
```
npm i -D @craco/craco
```
2. Create a CRACO configuration file in your project's root directory and [configure](https://craco.js.org/docs/):
```diff
my-app
├── node_modules
+ ├── craco.config.js
└── package.json
```
3. Update the existing calls to `react-scripts` in the `scripts` section of your `package.json` to use the `craco` CLI:
```diff title="package.json"
"scripts": {
- "start": "react-scripts start"
+ "start": "craco start"
- "build": "react-scripts build"
+ "build": "craco build"
- "test": "react-scripts test"
+ "test": "craco test"
}
```
Visit [craco.js.org](https://craco.js.org) to learn more.