Skip to content
New issue

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

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

Already on GitHub? # to your account

Opt-in to use sucrase instead of babel #196

Closed
rdmurphy opened this issue May 8, 2020 · 2 comments
Closed

Opt-in to use sucrase instead of babel #196

rdmurphy opened this issue May 8, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@rdmurphy
Copy link
Owner

rdmurphy commented May 8, 2020

It would replace the need to pass in a minimum Node version but I could totally see scenarios where you're fine with that and just want the brute-force speed of sucrase. typebundle itself could definitely use it.

Would probably just be a --sucrase flag that disables all babel features and activates @rollup/plugin-sucrase instead to do type-stripping.

@rdmurphy rdmurphy added the enhancement New feature or request label May 8, 2020
@rdmurphy
Copy link
Owner Author

rdmurphy commented May 8, 2020

sucrase doesn't support the latest TypeScript features yet like type imports unfortunately, making this a no-go for now.

@rdmurphy
Copy link
Owner Author

rdmurphy commented Sep 8, 2020

Thought about this more and I'm actually fine to let Babel continue being the primary type-stripper. Now that it's possible to skip @babel/preset-env I think this is less of an issue. I trust that @babel/preset-typescript will be more current than the alternatives, and I have nothing that's slow enough to drag sucrase or esbuild into it.

@rdmurphy rdmurphy closed this as completed Sep 8, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant