File tree Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,26 @@ Add it to _plugins_ in your _tsconfig.json_
31
31
}
32
32
```
33
33
34
- See https://github.com/LeDDGroup/typescript-transform-paths/issues/4#issuecomment-486380340 for generating declaration files.
34
+ ### Transforming declatation paths
35
+
36
+ If you want to generate declaration (_ .d.ts_ ) files with transformed paths you have to
37
+ modify your _ tsconfig.json_ file:
38
+
39
+ ``` json
40
+ "compilerOptions" : {
41
+ "baseUrl" : " ./" ,
42
+ "paths" : {
43
+ "@utils/*" : [" utils/*" ]
44
+ },
45
+ "declaration" : true ,
46
+ "plugins" : [
47
+ { "transform" : " typescript-transform-paths" },
48
+ { "transform" : " typescript-transform-paths" , "afterDeclarations" : true }
49
+ ]
50
+ }
51
+ ```
52
+
53
+ See [ issue4] ( https://github.com/LeDDGroup/typescript-transform-paths/issues/4#issuecomment-486380340 ) for more information.
35
54
36
55
## Example
37
56
@@ -93,6 +112,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
93
112
94
113
<!-- markdownlint-enable -->
95
114
<!-- prettier-ignore-end -->
115
+
96
116
<!-- ALL-CONTRIBUTORS-LIST:END -->
97
117
98
- This project follows the [ all-contributors] ( https://github.com/all-contributors/all-contributors ) specification. Contributions of any kind welcome!
118
+ This project follows the [ all-contributors] ( https://github.com/all-contributors/all-contributors )
119
+ specification. Contributions of any kind welcome!
You can’t perform that action at this time.
0 commit comments