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

[WIP] feat: support es6 module default export #336

Merged
merged 2 commits into from Jan 19, 2018

Conversation

tungv
Copy link
Contributor

@tungv tungv commented Jan 12, 2018

this allows projects that compiled through babel can conveniently export default a Promise

// instead of
module.exports = app.prepare().then(() => service);

// babel users can do this
export default app.prepare().then(() => service);

@leo
Copy link
Contributor

leo commented Jan 12, 2018

Wonderful addition! Can you add tests?

@tungv
Copy link
Contributor Author

tungv commented Jan 12, 2018

@leo I'm not sure which test file is in charge of this kind of functionality currently. Probably I need to add tests for handler.js

@tungv
Copy link
Contributor Author

tungv commented Jan 19, 2018

@leo I'm not sure how to test this, can you point me to the test for async setup function so I can have a clue?

Copy link
Member

@timneutkens timneutkens left a comment

Choose a reason for hiding this comment

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

This is perfect 👌

@timneutkens timneutkens merged commit dd2a4bb into vercel:master Jan 19, 2018
@timneutkens
Copy link
Member

@tungv I'll create an issue for the tests. I'll add them 👍

@tungv tungv deleted the patch-1 branch January 19, 2018 09:52
@tungv
Copy link
Contributor Author

tungv commented Jan 19, 2018

thank you @timneutkens. As a heavy babel user, I'm longing for this feature

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.

None yet

3 participants