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

babel-preset: updates #8

Closed
tunnckoCore opened this issue Nov 3, 2019 · 7 comments
Closed

babel-preset: updates #8

tunnckoCore opened this issue Nov 3, 2019 · 7 comments

Comments

@tunnckoCore
Copy link

tunnckoCore commented Nov 3, 2019

  1. add babel-plugin-unassert - similar to what TSDX is doing with babel-plugin-dev-expression, why not even both.
  1. add babel-plugin-annotate-pure-calls
  2. allow passing and overriding of preset-env options
  3. allow disabling of fast-async or allow passing/override options
  4. add babel-plugin-minify-builtins

I know that that's the point of having custom shareable configs, but this preset is quite good and I agree with most of it anyway. There's very few full featured and good presets out there.

@JounQin
Copy link
Member

JounQin commented Nov 3, 2019

allow disabling of fast-async or allow passing/override options

If you prefer generator, pass a truthy generator option:

https://github.com/1stG/configs/blob/master/packages/babel-preset/index.js#L112

@tunnckoCore
Copy link
Author

tunnckoCore commented Nov 3, 2019

If you prefer generator, pass a truthy generator option:

Yes, but I prefer NO transformations for async/await :D If I pass generator: false they won't be excluded from preset-env so it will be transformed. That's can be fixed with 3.

Plus: add babel-plugin-minify-dead-code-elimination.

@JounQin
Copy link
Member

JounQin commented Nov 3, 2019

Thx for suggestions, I'll consider them tomorrow, I'm going to sleep now. 🤣

Good Night ~

@tunnckoCore
Copy link
Author

Okay. No worry. :)

@JounQin
Copy link
Member

JounQin commented Nov 5, 2019

I was a bit busy on business, but I'm thinking they should be included in another preset like babel-preset-minify or a new babel-preset-optimize.

@JounQin
Copy link
Member

JounQin commented Nov 5, 2019

And about the async syntax, I think an option like asyncTransformer: 'fast' | 'generator' | false should be fine.

And promise for babel-plugin-transform-async-to-promises could be considered also.

@tunnckoCore
Copy link
Author

tunnckoCore commented Nov 6, 2019

I'm thinking they should be included in another preset like

Yup, was thinking to publish something like that.

And about the async syntax

Great idea. Agree. :)

@JounQin JounQin closed this as completed in 99a9666 Nov 9, 2019
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

2 participants