|
1 | 1 | # Migration
|
2 | 2 |
|
3 |
| -# Migration from react-app-rewired-alias |
| 3 | +## Migration from react-app-rewired-alias |
4 | 4 |
|
5 |
| -Dangerous mode is renamed to extended/extremal. The implementation |
6 |
| -for dangerous mode is moved to separaded liblrary with suffix **`-ex`**. |
| 5 | +### Generic mode |
7 | 6 |
|
8 | 7 | * Replace library name for generic mode
|
9 | 8 |
|
10 | 9 | ```diff
|
11 |
| -- const {alias} = require('react-app-rewire-alias') |
12 |
| -+ const {alias} = require('react-app-alias') |
| 10 | +- const {...} = require('react-app-rewire-alias') |
| 11 | ++ const {...} = require('react-app-alias') |
13 | 12 | ```
|
14 | 13 |
|
| 14 | +* Rename function `alias` to `aliasWebpack` |
| 15 | + |
| 16 | +```diff |
| 17 | +- const {alias} = require('react-app-alias') |
| 18 | ++ const {aliasWebpack} = require('react-app-alias') |
| 19 | +``` |
| 20 | + |
| 21 | +### Dangerous mode |
| 22 | + |
| 23 | +Dangerous mode is renamed to extended/extremal and the implementation |
| 24 | +is moved to separated liblrary with suffix **`-ex`**. |
| 25 | + |
15 | 26 | * Replace library name for dangerous mode,
|
16 | 27 | * Remove `/lib/aliasDangerous` path part from import,
|
17 | 28 | * Notice that library name is different (suffix `-ex` added),
|
18 |
| -* Fangerous mode function `aliasDangerous` for `react-app-rewired` or `customize-cra` is renamed to `alias`. |
19 | 29 |
|
20 | 30 | ```diff
|
21 |
| -- const {aliasDangerous} = require('react-app-rewired-alias/lib/aliasDangerous') |
22 |
| -+ const {alias} = require('react-app-alias-ex') |
| 31 | +- const {...} = require('react-app-rewired-alias/lib/aliasDangerous') |
| 32 | ++ const {...} = require('react-app-alias-ex') |
23 | 33 | ```
|
24 | 34 |
|
| 35 | +* For dangerous mode function `aliasDangerous` for `react-app-rewired` or `customize-cra` is renamed to `aliasWebpack` (also same as function `alias` for generic mode). |
| 36 | + |
| 37 | +* Rename function `alias` to `aliasWebpack` |
| 38 | + |
| 39 | +```diff |
| 40 | +- const {aliasDangerous} = require('react-app-alias-ex') |
| 41 | ++ const {aliasWebpack} = require('react-app-alias-ex') |
| 42 | +``` |
| 43 | + |
| 44 | + |
0 commit comments