-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Showing
5 changed files
with
38 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,44 @@ | ||
# Migration | ||
|
||
# Migration from react-app-rewired-alias | ||
## Migration from react-app-rewired-alias | ||
|
||
Dangerous mode is renamed to extended/extremal. The implementation | ||
for dangerous mode is moved to separaded liblrary with suffix **`-ex`**. | ||
### Generic mode | ||
|
||
* Replace library name for generic mode | ||
|
||
```diff | ||
- const {alias} = require('react-app-rewire-alias') | ||
+ const {alias} = require('react-app-alias') | ||
- const {...} = require('react-app-rewire-alias') | ||
+ const {...} = require('react-app-alias') | ||
``` | ||
|
||
* Rename function `alias` to `aliasWebpack` | ||
|
||
```diff | ||
- const {alias} = require('react-app-alias') | ||
+ const {aliasWebpack} = require('react-app-alias') | ||
``` | ||
|
||
### Dangerous mode | ||
|
||
Dangerous mode is renamed to extended/extremal and the implementation | ||
is moved to separated liblrary with suffix **`-ex`**. | ||
|
||
* Replace library name for dangerous mode, | ||
* Remove `/lib/aliasDangerous` path part from import, | ||
* Notice that library name is different (suffix `-ex` added), | ||
* Fangerous mode function `aliasDangerous` for `react-app-rewired` or `customize-cra` is renamed to `alias`. | ||
|
||
```diff | ||
- const {aliasDangerous} = require('react-app-rewired-alias/lib/aliasDangerous') | ||
+ const {alias} = require('react-app-alias-ex') | ||
- const {...} = require('react-app-rewired-alias/lib/aliasDangerous') | ||
+ const {...} = require('react-app-alias-ex') | ||
``` | ||
|
||
* For dangerous mode function `aliasDangerous` for `react-app-rewired` or `customize-cra` is renamed to `aliasWebpack` (also same as function `alias` for generic mode). | ||
|
||
* Rename function `alias` to `aliasWebpack` | ||
|
||
```diff | ||
- const {aliasDangerous} = require('react-app-alias-ex') | ||
+ const {aliasWebpack} = require('react-app-alias-ex') | ||
``` | ||
|
||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
const {aliasDangerous, aliasJest, configPaths} = require('react-app-alias-ex') | ||
const {aliasWebpack, aliasJest, configPaths} = require('react-app-alias-ex') | ||
|
||
const aliasPaths = configPaths('./tsconfig.paths.json') | ||
|
||
module.exports = aliasDangerous(aliasPaths) | ||
module.exports = aliasWebpack(aliasPaths) | ||
module.exports.jest = aliasJest(aliasPaths) |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
const {alias, aliasJest, configPaths} = require('react-app-alias') | ||
const {aliasWebpack, aliasJest, configPaths} = require('react-app-alias') | ||
|
||
const aliasPaths = configPaths('./tsconfig.paths.json') | ||
|
||
module.exports = alias(aliasPaths) | ||
module.exports = aliasWebpack(aliasPaths) | ||
module.exports.jest = aliasJest(aliasPaths) |
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