Closed dcsan closed 2 years ago
Hi, @dscan
To use with both, simply follow both instructions.
For typescript-transform-paths
perform the step in 1. Install and 2. Configure
Then for ts-patch follow steps: 1, 2, & 3.
After you do, whenever tsc is run, it will transform your paths
Hope that helps!
@nonara can you provide an example? its still not very clear what we need to do. I followed ts-patch
instructions & your instructions and I still don't have any of my aliases changed
@marcellino-ornelas You can see it in action here https://github.com/nonara/slonik-plus
Note the package.json prepare
script and the two plugins entries in the tsconfig.json file. Also the paths config in the same.
I wasnt able to get the ts-patch
working correctly and link to the repo took me to a 404 but I got it working by installing ttypescript
adding the following code to tsconfig.json
{
"compilerOptions": {
/* other code */
"plugins": [
{ "transform": "typescript-transform-paths" },
{ "transform": "typescript-transform-paths", "afterDeclarations": true }
]
},
}
after that ttsc
got everything working 🙌🏽
Didn't realize the repo was private. It's public now. Glad you got it working!
could you give an example please? i've looked ts-patch docs but not clear how to combine these both.
I was hoping I can just add something to my
package.json
like this: