5 ms·
> Use Absolute Paths for Importing Code Blocks I've always felt this one should be built into the TypeScript compiler. Most of my projects are set up to share
by tyleo 4y ago
> Use Absolute Paths for Importing Code Blocks
I've always felt this one should be built into the TypeScript compiler. Most of my projects are set up to share some utilities and its annoying to integrate babel or other tools just to fix the paths. I've previously used [ttypescript](https://github.com/cevek/ttypescript https://github.com/cevek/ttypescript) with the [typescript-transform-paths](https://www.npmjs.com/package/typescript-transform-paths https://www.npmjs.com/package/typescript-transform-paths) plugin. Gosh, it would be enough if TypeScript just natively supported plugins in the tsconfig (which is what ttypescript provides).
- ntr-- 4y agotypescript DOES support this out of the box. https://www.typescriptlang.org/tsconfig#baseUrl https://www.typescriptlang.org/tsconfig#baseUrl
- tyleo 4y agoThis has not worked in my experience. It allows the IDE to understand the paths but the generated js doesn’t work… maybe I did something wrong?