-
Notifications
You must be signed in to change notification settings - Fork 331
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
Update to babel 6 #31
Conversation
The travis build is broken with npm 2 (you should probably clear the cache) but it works on my machine (tm) For some reason, karma no longer likes being run in |
What does the use case of setting your own babel stage and enabling loose mode look like with Babel 6? i really liked how simple this was with Babel 5 since all the transforms were included, but I suspect we could support the same configuration UI with more work behind the scenes. |
Hi @insin. Essentially, the stage is now a preset and not a babel property so we have to extract it out of the user config. Cool side-effect: selecting a babel stage with nwb becomes simpler than with vanilla babel 😄 I amended the tests for them to reflect a real usage with babel 6. |
Please clear the travis cache to make the build pass! |
@geowarin Is this still blocked by the travis cache or is there a larger overriding issue? Just ran into the limitations of babel 5 and came looking for this exact issue |
Hi @cafreeman! This PR was a work in progress. |
@cafreeman Could you add the issues you're having to #12? I'm using nwb in projects at work which use vanilla Node.js 4 LTS, which comes with npm2. I don't currently need to upgrade to Babel 6 and I'm not willing to make install time, size and performance unacceptable with npm2 in order to do so. |
Just my two cents, but I think babel 5 is a better choice for now. Babel 6 has issues with decorators. |
@insin My issues actually were related to presets, but I ended up figuring out how to tweak the |
I'd love to see |
@tomchentw do you know if anyone has made alternative I was wondering if it would be feasible to have one module which depends on every single plugin, offers a bunch of entry points for the different presets, and includes all the plugin module dependencies in its own dependencies so they don't get duplicated underneath it. Would be interesting if it could also handle a loose mode entry point for each preset, so current nwb If that's now possible, I'd rather have |
@insin FYI, today's news, you may want to try out |
That looks like good news :) My approach to avoiding that was potentially going to be creating a new package which depends on all the babel plugins, uses its own I may still do this as we need to manage that somewhere anyway. |
On second reading, it seems this bug gave npm3 users the npm2 experience w.r.t. babel-runtime when this particular dependency scenario occurred, so it won't improve things with npm2. This PR looks like it handles the way I want to use |
@insin not sure if update to babel 6 is a great idea ATM because it has an issue with parent constructor calls in IE < 11, check it out: https://phabricator.babeljs.io/T3041 |
Thanks for the PR @geowarin, it was really handy when getting started with the Babel 6 work, but there ended up being way more I discovered I wanted to do and it turned into a massive commit in the end. |
This is a WIP for #12.
Currently, there is a bit of duplication on the babel presets used for the different builds, we can definitely do something smarter.
I chose to use the following presets for babel: