You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Transform module resolution paths in compiled output source to conform with `TypeScript` internal resolution via `tsconfig.json` settings (`paths`, `rootDirs`, `baseUrl`)
-**To use with node** — Use the register script: `node -r typescript-transform-paths/register src/index.ts`
54
70
55
71
## Virtual Directories
56
72
TS allows defining
@@ -145,42 +161,6 @@ Use the `@no-transform-path` tag to explicitly disable transformation for a sing
145
161
import'normally-transformed'// This will remain 'normally-transformed', even though it has a different value in paths config
146
162
```
147
163
148
-
## `ts-node` & TS Compiler API Usage
149
-
150
-
### Note
151
-
Most people using `ts-node` can achieve what they want without the transformer, by using [tsconfig-paths](https://github.com/dividab/tsconfig-paths#readme]) (ie. `ts-node-rtsconfig-paths`)
152
-
153
-
### Others
154
-
155
-
If you'd still like to use the transformer, it is now possible to do so programmatically, with or without a `Program` instance. This can be done via `ts-node` or the compiler API using `ts.transform()`.
156
-
157
-
Here is an example of how to register `ts-node` with the transformer:
For TS compiler API usage example, have a look at the logic in [specific.test.ts](https://github.com/LeDDGroup/typescript-transform-paths/blob/master/test/tests/transformer/specific.test.ts) for `manual` mode.
183
-
184
164
## Articles
185
165
186
166
- [Node Consumable Modules With Typescript Paths](https://medium.com/@ole.ersoy/node-consumable-modules-with-typescript-paths-ed88a5f332fa?postPublishedType=initial) by [oleersoy](https://github.com/oleersoy)
0 commit comments