An ESBuild plugin that enables TypeScript decorator metadata emission (emitDecoratorMetadata) which ESBuild does not support natively. Version 0.1.0 is the initial release, with no further updates. It fills a gap for developers using ESBuild with decorators, as ESBuild skips type system features. This plugin ensures Reflect.getMetadata returns correct type information (e.g., design:type) during transpilation. It is a lightweight alternative to switching to tsc or ts-jest, but limited to emitDecoratorMetadata support only.
npm install esbuild-plugin-typescript-decoratorsVerified import paths — ran on the pinned version, not inferred.
Shows basic usage to bundle a TypeScript file with decorator metadata using ESBuild and the plugin.
Use a different tool like tsc or swc for full decorator support.
Use esbuildDecorators() in plugins array.
Check compatibility; consider forking or using alternatives.
Install typescript: npm install --save-dev typescript
Use import { esbuildDecorators } from 'esbuild-plugin-typescript-decorators' and then in plugins: [esbuildDecorators()]Set "experimentalDecorators": true and "emitDecoratorMetadata": true in tsconfig.