-
Notifications
You must be signed in to change notification settings - Fork 94
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
ui5-task-transpile - regeneratorRuntime is not defined #242
Comments
hi, i'm assuming you're using hth, v. |
Hi Volker Regards |
ab-so-lutely. i'm sure both @petermuessig and me would appreciate you giving it a shot :) |
Y-E-S! :-) As Volker mentioned above, also @lemaiwo did it already in the past - he create a PR for another project which I did not continue anymore: petermuessig/my-es6-ui5-app#7 |
Hi, have you considered using babel-plugin-transform-async-to-promises in order to support async/await? After all, we already have Promises in UI5. |
Hi ,
Merging the transpiler with the regenerator into the transpiler of Peter is on my todo list ... need to make time to create a pull request for this! :)
Your proposal is a great idea! Automatically adding the regenerator runtime requires a lot of additional config in the ui5.yaml. This Babel transpiler for Async await might be the better solution!
Kr, Wouter
Op 30 jun. 2020 om 20:51 heeft Lennart <[email protected]> het volgende geschreven:
Hi, have you considered using babel-plugin-transform-async-to-promises<https://www.npmjs.com/package/babel-plugin-transform-async-to-promises> in order to support async/await?
I find the resulting syntax a lot more readable and it does not require any additional code like regenerator-runtime, especially after activating the option inlineHelpers.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#242 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABNK7D3FC4KXTM2POF3XNZDRZIX4XANCNFSM4OE2ZVFA>.
|
Hi @lemaiwo {
"plugins": [
[
"babel-plugin-transform-async-to-promises",
{
"inlineHelpers": true
}
]
]
} No changes to the task/middleware is required. Though the default configuration by the Also this does not enable usage of async generator functions, just async regular functions. But this is already quite a step forward. |
Hi @lennart-m, from my point of view async generator functions aren't that important. Regular async functions are way more important. So this approach would absolutely meet my requirements. I would love to see this issue handled by this custom task. Couldn't this be implemented similar to the It could be enabled by adding another option to custom task configuration:
In the transpile task the plugin could be loaded, if Best regards, |
Hi
i use the task ui5-task-transpile to compile my es6 code to es5.
Unfortunately the app doesn't start after compiling because of the following error
regeneratorRuntime is not defined
I have seen the comment in the
Main.controller.js
of the demo appAre there any plans to implement the functionality?
Many greetings
The text was updated successfully, but these errors were encountered: