justkey007 / tsc-alias

Replace alias paths with relative paths after typescript compilation
MIT License
894 stars 62 forks source link

Single path transformation #228

Open RebeccaStevens opened 2 months ago

RebeccaStevens commented 2 months ago

Is it possible to programmatically get the replacement path from a given input path.

const replacementPath = getReplacement("#/app/foo");
console.log(replacementPath) // => ./src/foo.js
{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "#/app/*": ["src/*"],
    }
  }
}