Skip to content

Commit 5e1883c

Browse files
authored
docs: add how it works
1 parent 8bcb871 commit 5e1883c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/how-it-works.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# How it works
2+
3+
The library `create-react-app` is an executable that generates minimal simple apps with
4+
`react-scripts` dependency. The `react-scripts` is a complicated library that has webpack
5+
and jest and other configuration files. It makes app simple by doing all the complicated
6+
work it configures webpack with plugins and loaders, configure jest, etc.
7+
8+
If someone wants to modify configuration, react-scripts suggests eject command.
9+
Eject copys all mentioned config files to your project so you can modify it.
10+
But after eject the project owner must update and fix configuration which requires
11+
knowledge and attention to packages updates and security fixes. Updating `react-sctipt`
12+
is more simple but it is not possible after eject.
13+
14+
The library `react-scripts` does not provide a way to get runtime configs and do some
15+
fixes. There are some libraries like `react-app-rewired`, `customize-cra`, `craco` that do
16+
runtime patch configs of `react-scripts` and pass final config to user function to modify.
17+
18+
The react-app-alias library confgures aliases in runtime.

0 commit comments

Comments
 (0)