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

Add a recipe to transpile async functions #579

Closed
wants to merge 2 commits into from
Closed

Add a recipe to transpile async functions #579

wants to merge 2 commits into from

Conversation

laruiss
Copy link

@laruiss laruiss commented Apr 3, 2020

Add a minimal babel configuration example to transpile async functions.

Add a minimal babel configuration example to transpile async functions.
@height
Copy link

height bot commented Apr 3, 2020

Link Height tasks by mentioning a task ID in the pull request title or description, commit messages, or comments.

You can also use "Close T-X" to automatically close a task when the pull request is merged.

@vercel
Copy link

vercel bot commented Apr 3, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/devongovett/website/retohtwust
✅ Preview: In Progress

],
"plugins": [
["@babel/plugin-transform-runtime", {
"regenerator": true
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are those lines for ? I think it is not required for @babel/preset-env to work well.

By the way I think it is related to this error parcel-bundler/parcel#2936 ? I've faced it too and can't find a way to fix it... is it the solution ?

Copy link
Author

@laruiss laruiss Apr 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @benavern, sorry for the delay.
It is to be able to transpile properly async functions.

Without it, I get this error in the console :

ReferenceError: regeneratorRuntime is not defined

And obviously the code does not work.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok. I have struggled with this error too but not with async functions. If I remember well this is when using a bundle (generated by parcel) as a dependancy in a project that uses parcel too.
And I don't have any async function in it.
If you wonna help on it: https://github.com/benavern/z-components

@DeMoorJasper
Copy link
Member

I really like this but unfortunately we're having issues with deploying the v1 site, so I'm gonna close this for now as we're mainly focusing on v2 and the docs site for that version and it doesn't seem like we'll be able to fix the deploy...

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

Successfully merging this pull request may close these issues.

3 participants