{"id":26948,"library":"esbuild-plugin-ts","title":"esbuild-plugin-ts","description":"esbuild-plugin-ts is an esbuild plugin that integrates TypeScript's exotic features, such as type checking, decorator metadata emission, and path alias resolution. Current version is 0.1.1-rev-1.0, released as in-development and not feature complete. It leverages the TypeScript compiler (tsc) under the hood to address esbuild's limitations in handling TypeScript while remaining fast via worker threads. Key differentiators: focuses on bridging gaps for advanced TypeScript features like decorators and path aliases, unlike simpler plugins that only provide basic transpilation.","status":"active","version":"0.1.1-rev-1.0","language":"javascript","source_language":"en","source_url":"https://github.com/jahirvidrio/esbuild-plugin-ts","tags":["javascript","esbuild","esbuild-plugin","tsc","typescript","path-alias","decorators","type-checking"],"install":[{"cmd":"npm install esbuild-plugin-ts","lang":"bash","label":"npm"},{"cmd":"yarn add esbuild-plugin-ts","lang":"bash","label":"yarn"},{"cmd":"pnpm add esbuild-plugin-ts","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency: plugin is designed to be used as an esbuild plugin","package":"esbuild","optional":false},{"reason":"uses TypeScript compiler for type checking and emit features","package":"typescript","optional":false}],"imports":[{"note":"Default export; CommonJS users should use require('esbuild-plugin-ts').default or set esModuleInterop.","wrong":"const esbuildPluginTs = require('esbuild-plugin-ts').default","symbol":"esbuildPluginTs","correct":"import esbuildPluginTs from 'esbuild-plugin-ts'"},{"note":"Type import only; do not use value import as it will cause runtime error","wrong":"import { EsbuildPluginTsOptions } from 'esbuild-plugin-ts'","symbol":"EsbuildPluginTsOptions","correct":"import type { EsbuildPluginTsOptions } from 'esbuild-plugin-ts'"},{"note":"The default export is a function that returns the plugin object, not an object with a plugin property.","wrong":"esbuildPluginTs.plugin()","symbol":"plugin","correct":"import esbuildPluginTs from 'esbuild-plugin-ts'; esbuildPluginTs()"}],"quickstart":{"code":"import { build } from 'esbuild';\nimport esbuildPluginTs from 'esbuild-plugin-ts';\n\nbuild({\n  entryPoints: ['src/index.ts'],\n  bundle: true,\n  outfile: 'dist/out.js',\n  plugins: [esbuildPluginTs()]\n}).catch(() => process.exit(1));","lang":"typescript","description":"Basic usage of esbuild-plugin-ts to bundle a TypeScript entry point with type checking and advanced transforms."},"warnings":[{"fix":"Ensure a tsconfig.json exists in the project root, or pass options with a custom tsconfig path.","message":"esbuildPluginTs() may throw if no tsconfig.json is found.","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Check the README for feature status; do not rely on unimplemented features like path alias resolution or decorator metadata.","message":"The plugin is in-development and not feature complete; features listed as '[ ]' are not yet implemented.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Avoid running multiple builds simultaneously, or serialize builds.","message":"TypeScript worker thread may cause port conflicts if multiple builds run concurrently.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Manually check tsc output or use a separate type checking step.","message":"Type errors from tsc are not propagated as esbuild errors; build may succeed even with type errors.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `npm install esbuild-plugin-ts` or `yarn add esbuild-plugin-ts`.","cause":"Package not installed or not in node_modules.","error":"Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'esbuild-plugin-ts' imported from ..."},{"fix":"Use `import esbuildPluginTs from 'esbuild-plugin-ts'` and call as `esbuildPluginTs()`.","cause":"Importing wrong export (e.g., using destructured import instead of default).","error":"TypeError: esbuildPluginTs is not a function"},{"fix":"Create a tsconfig.json file or pass `{ tsconfig: 'path/to/tsconfig.json' }` in the options.","cause":"No tsconfig.json found.","error":"Error: [esbuild-plguin-ts] Unable to locate tsconfig.json. Ensure you have a tsconfig.json in the project root or provide the path via options."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}