File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 18
18
+ const {aliasWebpack} = require('react-app-alias')
19
19
```
20
20
21
+ If dangerous mode is not used, scroll dow through next section to continue.
22
+
21
23
### Dangerous mode
22
24
23
25
Dangerous mode is renamed to extended/extremal and the implementation
@@ -41,4 +43,22 @@ is moved to separated liblrary with suffix **`-ex`**.
41
43
+ const {aliasWebpack} = require('react-app-alias-ex')
42
44
```
43
45
46
+ ### Options
47
+
48
+ Before the agrument of ` aliasWebpack() ` and ` aliasJest() ` was alias map.
49
+ Now the argument of these functions is options.
50
+ Alias map now is ` alias ` option. So replace:
44
51
52
+ ``` diff
53
+ const aliasMap = configPaths("./tsconfig.paths.json")
54
+ // or possible alias map created in code
55
+ const aliasMap = {
56
+ '@app': 'src/app',
57
+ '@lib': 'lib',
58
+ }
59
+
60
+ - module.exports = aliasWebpack(aliasMap)
61
+ - module.exports.jest = aliasJest(aliasMap)
62
+ + module.exports = aliasWebpack({alias: aliasMap})
63
+ + module.exports.jest = aliasJest({alias: aliasMap})
64
+ ```
You can’t perform that action at this time.
0 commit comments