Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request to make rollup-plugin-typescript2 the "official" typescript plugin #541

Closed
benmccann opened this issue Aug 16, 2020 · 6 comments
Closed

Comments

@benmccann
Copy link
Contributor

benmccann commented Aug 16, 2020

I appreciate all the work that's gone into @rollup/plugin-typescript. However, the fragmentation in the Rollup plugin ecosystem has made it very hard for me to get started as a user. I tried three different Rollup plugins (@plugins/typescript, rollup-plugin-ts, and rollup-plugin-typescript) before finally finding one that I could get working. rollup-plugin-typescript2 is the most trouble free in my experience.

I'm guessing others have found that to be true too based off the usage stats:

  • @rollup/plugin-typescript - 53k weekly download
  • rollup-plugin-typescript2 - 260k weekly downloads

Why not combine forces? Replace @rollup/plugin-typescript with rollup-plugin-typescript2 and all contribute to a single Rollup TypeScript plugin instead of splitting efforts

@shellscape
Copy link
Collaborator

shellscape commented Aug 16, 2020

They each have their own merits and their own problems. To state that one is better than the other is purely subjective. I typically find the the ts2 plugin is a dumpster fire of quirks and workarounds for larger projects, which is most of what I work on for my regular job. I don't have the same issues with the official plugin, thanks to the excellent work of @NotWoods. In my subjective opinion, the plugin here is superior.

As for combining forces, we'd absolutely welcome contributions here from the ts2 plugin author, without question and with grace. We'd welcome your contributions to it as well.

I'm guessing others have found that to be true too based off the usage stats:

NPM downloads are not an indicator of quality. They're usually an indicator of legacy. ts2 was created because rollup-plugin-typescript fell into neglect and disrepair. The scoped, official plugin came into being last year after many users had abandoned the old plugin. The nuance behind stats is important, ignore them at peril.

That said, the suggestion that we scrap the plugin here and wholesale replace it is dead in the water. Closing for now, but please feel free to discuss further. (For those who do, be careful not to get personal in criticism)

@NotWoods
Copy link
Member

I'll add that I do also look at implementations used by other plugins and emulate parts that are important. rollup-plugin-typescript2 is often criticized for being too slow, so I don't want to just replace everything with that plugin. Ideally I'd like to find a solution that works well and works fast.

@benmccann
Copy link
Contributor Author

I actually found rollup-plugin-typescript2 to be faster for the projects I worked on. However, it turns out that plugin doesn't have any tests. While I generally have encountered very few issues with it, now that I have finally run into an issue with it I feel like it would be very hard to debug and contribute to it as a result.

In the meantime a lot of the issues I encountered with @rollup/plugin-typescript have been fixed. Given that the plugins are reaching parity in terms of stability and that @rollup/plugin-typescript is much better tested, it probably makes more sense to focus efforts there. I just wanted to share the comparison for anyone else who comes across this and say thanks to the team for working on this plugin. I think it may be useful to add a short note of comparison to the @rollup/plugin-typescript README to help others understand why it exists in addition to the other plugin(s). I'll send a PR for comment

@wessberg
Copy link

Hi @benmccann,

I'm curious as to what bug you have encountered with rollup-plugin-ts and wholeheartedly encourage you to open a issue such that I can look into it. While I understand that you want the different plugins to converge, some of them are still quite different from each other. For example, rollup-plugin-ts is also a declaration bundler and integrates with babel, which you may not want. But you can be certain we're all doing our absolute best to make them the best they can be.

@benmccann
Copy link
Contributor Author

It's been too long at this point. I don't remember

@michaelfaith
Copy link

I've recently encountered some really weird bugs in rollup-plugin-typescript2, and after switching to @rollup/plugin-typescript they went away. So I'll throw my hat in for the official library as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants