serverless-bundle icon indicating copy to clipboard operation
serverless-bundle copied to clipboard

Add `babel-plugin-transform-typescript-metadata` plugin

Open darbio opened this issue 3 years ago • 3 comments

Thanks for your great plugin - saves us a lot of time and effort getting things up and running.

Lots of projects use typescript metadata (e.g. tsyringe, typestack, typegoose ... to name a few).

We are trying to implement dependency injection framework tsyringe into our stack to simplify dependency resolution, and in order for this to work with babel, we have to install the babel plugin babel-plugin-transform-typescript-metadata.

Decorators especially are a highly used part of typescript so it would be good to be able to support them in this plugin.

darbio avatar Nov 06 '22 22:11 darbio

+1 this is needed for libraries like typeorm

enchorb avatar Nov 29 '22 12:11 enchorb

+1 typeorm does not work with esbuild enabled unless we annotate absolutely everything, which is not needed when esbuild is disabled.

esbuild not emiting metadata is the root cause for that problem, but that feature is not exposed via config.

dpecos avatar Mar 17 '23 14:03 dpecos

+1. That'd be great.

ricardo-cn avatar Aug 17 '23 17:08 ricardo-cn