esbuild-ts-paths

1.1.3 • Public • Published

esbuild-ts-paths

Transform TS path alias to absolute paths for esbuild

Example

// tsconfig.json

"compilerOptions": {
  "outDir": "./dist",
    "baseUrl": ".",
    "paths": {
    "@common/*": ["../common/*"], // asterisks are important
    "@shared/*": ["./src/shared/*"]
  }
}
// esbuild
const tsPaths = require("esbuild-ts-paths") 
esbuild.build({
    //...
    plugins:[
        tsPaths(
            "./path/to/tsconfig.json" // optional, defaults to ./tsconfig.json
        )
    ]
})

Readme

Keywords

none

Package Sidebar

Install

npm i esbuild-ts-paths

Weekly Downloads

634

Version

1.1.3

License

MIT

Unpacked Size

4.32 kB

Total Files

7

Last publish

Collaborators

  • frankleng