Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8236b3a
commit 9346d67
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Breaking change in 3.0.0 | ||
|
||
If you were using the CLI option `--react-scripts` your `craco` setup will not work for 3.0.0. | ||
|
||
Prior to 3.0.0, `--react-scripts` base path was `current_working_directory\node_modules`. | ||
|
||
In 3.0.0, `--react-scripts` is now `current_working_directory`. | ||
|
||
## The easy fix | ||
|
||
Remove 1 level from the relative path you provide to `--react-scripts`. | ||
|
||
Before: | ||
|
||
```bash | ||
$ craco start --react-scripts ../../../node_modules/react-scripts | ||
``` | ||
|
||
After: | ||
|
||
```bash | ||
$ craco start --react-scripts ../../node_modules/react-scripts | ||
``` | ||
|
||
## You use a fork of react-scripts | ||
|
||
If you provided `--react-scripts` because you're using a fork of `CRA` like `react-scripts-ts`, you should use `--scripts-version` instead. | ||
|
||
Before: | ||
|
||
```bash | ||
$ craco start --react-scripts react-scripts-ts | ||
``` | ||
|
||
After: | ||
|
||
```bash | ||
$ craco start --scripts-version react-scripts-ts | ||
``` | ||
|
||
## You use a monorepo | ||
|
||
If you provided `--react-scripts` because you use **yarn workspace** or any other **monorepo setup** that follow the `packages/*` convention, you should use `--workspace` instead. | ||
|
||
Before: | ||
|
||
```bash | ||
$ craco start --react-scripts ../../../node_modules/react-scripts | ||
``` | ||
|
||
After: | ||
|
||
```bash | ||
$ craco start --workspace | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters