Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Remove fast-async from the web preset #741

Closed
edmorley opened this issue Mar 10, 2018 · 1 comment
Closed

Remove fast-async from the web preset #741

edmorley opened this issue Mar 10, 2018 · 1 comment
Assignees

Comments

@edmorley
Copy link
Member

edmorley commented Mar 10, 2018

The web preset currently adds fast-async to the babel plugins list by default. The plugin provides a faster alternative to transform-async-to-generator.

However:

  • the web preset's default target browsers all now support async-functions natively (hard to believe, but true - caniuse !!) and so babel-preset-env doesn't even enable transform-async-to-generator for them (see here)
  • fast-aysnc is soon going to be merged into the core babel packages (Implement transform-async-to-promises babel/babel#7076) - so I'm guessing will be included in the babel 7 release, which we'll be updating to before shipping Neutrino 9 final. And so at that point we definitely won't need to include fast-async, regardless.

...as such I think we should be fine to remove fast-async in Neutrino 9, thereby simplifying the babel config in the web preset, and reducing the number of dependencies.

Note something similar could be done for the node preset, however it would need to wait until node 6 support was dropped - node.green.

@eliperelman
Copy link
Member

This is pretty amazing. For v9, I propose that we exclude fast-async for the Node.js preset as well and switch the matrix of support Node.js v8, since that will be current LTS at the time of release.

edmorley added a commit that referenced this issue Apr 16, 2018
Since:
* The default Neutrino-supported browsers (last two versions of Chrome,
  Firefox, Edge, Opera, Safari & iOS) all support async natively:
  https://caniuse.com/#feat=async-functions
* The same applies to Node 8+ (and Neutrino 9 is dropping support
  for Node 6): http://node.green/#ES2017-features-async-functions
* Neutrino 9 final will be released with Babel 7, which will likely
  include built-in support for the fast-async plugin anyway:
  babel/babel#7076
* It's another dependency to cause possible regressions, eg:
  MatAtBread/fast-async#53

Fixes #741.
@edmorley edmorley self-assigned this Apr 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants