babel-plugin-transform-typescript-metadata icon indicating copy to clipboard operation
babel-plugin-transform-typescript-metadata copied to clipboard

[survey] TypeScript and Babel feedback needed

Open leonardfactory opened this issue 4 years ago • 4 comments

Hello guys, I'd like to start saying a big thank you to everyone, for your support and using this project. Given that, and having this project in production, I've started to see some issues between the TS world and the babel world (even small ones), and I'd like to give this project a direction based on real needs, current usage, etc.

Before proceeding with my own thoughts however, I'd like to ask you to tell me some info about your usage, especially:

  • Are you using it in production?
  • What is your stack? Which techs do you use that need this plugin?
  • Do you use it in the Frontend, in the Backend or both?
  • Why did you use babel / babel-loader with this plugin instead of pure tsc / ts-loader?
  • Is there any particular issue you got that is not covered by this plugin / other plugins?

I know your time is precious, and I'll understand if you don't find a moment to answer, but I think this will be precious feedback for all the community, not only for this project. I'd like to see if there is something else I/we can do, and having the bigger picture could allow us to make our job easier, faster and more precise.

Thank you 🙏 , Leonardo

leonardfactory avatar Apr 26 '20 11:04 leonardfactory

I'd be happy to answer.

  • Yes, I use it in production.
  • I use it so TypeORM and decorator-based libraries can be compatible with Next.js, which uses webpack to bundle everything.
  • I use it on both frontend and backend, but I only use decorators on the backend so it's really only needed there.
  • Because Next.js made me
  • Not at the moment

RobbieGM avatar Apr 30 '20 21:04 RobbieGM

I have written several babel plugins to enhance the i18n support, in order to use those plugins, I need to use babel.

namnm avatar May 28 '20 15:05 namnm

I needed storybook for this project in typescript using reflect-metadata for dependency injection (with tsyringe). Storybook relies on babel and their configuration was failing due to unavailable metadata.

Adding your plugin solved the problem. Thanks a lot

  • Are you using it in production? Not yet

  • Using this plugin with storybook for a library in vanilla Typescript

  • Frontend

  • Because of an external tool storybook

DanielM235 avatar Sep 30 '20 12:09 DanielM235

We use Jest for writing all our test suites. (wasn't my decision :stuck_out_tongue:) Even though there is a third-party Jest transformer that compiles Typescript code, we had quite a lot of performance issues with using it, and we hoped that Jest would be more performant with Babel since that is the way that Jest recommends to write tests in Typescript. Many of our projects make extensive use of a couple of libraries that need decorator metadata in order to work. Using Jest with your Babel plugin works perfectly, thank you so much :tada: now our test suites run so much faster, and Jest no longer fills me with impotent rage

  • Are you using it in production? - No, in tests only
  • What is your stack? Which techs do you use that need this plugin? - Jest test suites, against projects using InversifyJS and class-validator
  • Do you use it in the Frontend, in the Backend or both? - Backend
  • Why did you use babel / babel-loader with this plugin instead of pure tsc / ts-loader? - Jest's out-of-the-box configuration uses Babel to run Typescript tests, which avoids the need to compile the tests separately or use the third-party transformer
  • Is there any particular issue you got that is not covered by this plugin / other plugins? - nope, works great!

mrattner avatar Apr 14 '21 06:04 mrattner