-
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
Will async functions with await statements be supported? #82
Comments
I have no configuration for babel. Right now it just transforms from 2015 to vanilla. I use babel in the project to transform any code. Since async await But what I'm going to do is change it to use babel preset env. I'll add details on this later. |
@danmademe Can't wait! :) Let me know if I can help, It'd be really useful for my current project so I'd be more than happy to collaborate! Thanks!! |
well it isn't that hard actually and yes you're free to open a pull request.. i'll point you in the right direction.. https://github.com/express-vue/express-vue/blob/master/lib/parser/index.js#L52 That's where the babel setup is.. https://github.com/babel/babel-preset-env#usage Change to using this.. and if you can find a way to pass in config from express-vue setup that would be amazing. app.set('vue', {
componentsDir: __dirname + '/components',
defaultLayout: 'layout',
babel: {
"presets": ["env"]
}
}); see how i added babel section there... try passing that through, you can add it into the defaults model, and add a fallback.. https://github.com/express-vue/express-vue/blob/master/lib/models/defaults.js Thanks |
if you can get it into the app.set, then it gives tremendous boost to flexibility.. |
This has changed since v4 .. but will add it into v4.1 |
I am interested in using async/await.
Currently it's not supported, how do you feel about adding certain babel plugins like this one?
Would this be a problem of where to draw the line of what plugins should be included?
I forked the repo and started to attempt to add the plugin but had a couple of issues, if there's interest I'll look further into it since I should be pretty close.
Thanks in advance!
The text was updated successfully, but these errors were encountered: