Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@hazae41/tscousin

hazae412431.0.28TypeScript support: included

Zero-config supply-chain hardened TypeScript paths and extensions rewriter

readme

TSCousin

Zero-config supply-chain hardened TypeScript paths and extensions rewriter

npm install -D @hazae41/tscousin
deno install -gfn tscousin -RW jsr:@hazae41/tscousin/bin

📦 NPM📦 JSR

Features

Current features

  • Uses your tsconfig.json
  • No external dependency
  • Clean and minimalist
  • Works on Deno too

Non features

  • CommonJS support

Usage

TSC will transpile ./src into ./out and then TSCousin will rewrite paths from ./out and also rewrite .(m)ts(x) imports into .js imports

tsc && tscousin
{
  "compilerOptions": {
    "rootDir": "./src",
    "paths": {
      "@/*": ["./src/*"]
    } ,
    "module": "nodenext",
    "moduleResolution": "nodenext",
    "outDir": "./out",
    "declaration": true
  },
  "include": [
    "./src/**/*"
  ],
  "exclude": []
}