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

Babel 7 support #52

Closed
oliviertassinari opened this issue Apr 8, 2018 · 7 comments
Closed

Babel 7 support #52

oliviertassinari opened this issue Apr 8, 2018 · 7 comments

Comments

@oliviertassinari
Copy link

Babel 7 is slowly rolling out. At some point, it would be great to add support for it.

@kentcdodds
Copy link
Owner

What's missing?

@oliviertassinari
Copy link
Author

oliviertassinari commented Apr 8, 2018

I believe we will need to upgrade the dependencies to @7

"babel-register": "^6.26.0",
"babylon": "^6.18.0",

@kentcdodds
Copy link
Owner

Sounds good. I'd be happy to accept a pull request for that 👍

@oliviertassinari
Copy link
Author

I have been lazy. I have managed to use Babel 7 by monkey patching some part of this plugin. Basically, it was all about:

-babel-registry
+@babel/registry

@tleunen
Copy link
Contributor

tleunen commented Jun 20, 2018

@oliviertassinari is there anything else to do than just updating the version?

tleunen added a commit to tleunen/babel-plugin-preval that referenced this issue Jun 20, 2018
Fix kentcdodds#52 by changing babel-register with @babel/register
@oliviertassinari
Copy link
Author

It's straightforward.

kentcdodds pushed a commit that referenced this issue Jun 22, 2018
* Make it work with Babel 7

Closes #52

* Fix usage of babel register

* Remove dependency on babel-register

* fix: support any version of babel

BREAKING CHANGE: We no longer run require('babel-register') so not all code will be transpiled with babel by preval. Some will, but it's advised to not write code that you want prevaled in a way that doesn't run in the version of node you're using
@kentcdodds
Copy link
Owner

🎉 This issue has been resolved in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

No branches or pull requests

3 participants