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: Support babel-source 6.0.x #282

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tricknotes
Copy link
Member

@lucasmazza
Copy link

Hey @tricknotes,

I'm using this gem with Sprockets and based on how Babel 6 does not contains any transformations by default I'm wondering if this gem will bundle any preset on top of babel-browser? I couldn't find any documentation on what is bundled on babel-browser so I want to know how the babel 5 -> 6 upgrade will affect the users of the Ruby transpiler.

@ralekna ralekna mentioned this pull request Nov 24, 2015
@ralekna
Copy link

ralekna commented Nov 24, 2015

I also miss mechanics on adding and loading Babel plugins into ExecJS context.

@Daniel15
Copy link
Member

Daniel15 commented Dec 1, 2015

browser.js no longer exists, you'll need to build your own version of Babel. I'm currently attempting to do the same thing for ReactJS.NET. Here's the relevant Babel issue: https://phabricator.babeljs.io/T6651

@Daniel15
Copy link
Member

@tricknotes In December I released a package called babel-standalone that works the same as the old babel-browser. It should (hopefully) be a drop-in replacement for Babel 5.

@rmacklin
Copy link

I'm interested in this. It would be nice if arbitrary Babel plugins were supported. @Daniel15, would your package allow additional plugins to be used?

@Daniel15
Copy link
Member

Yes, you can use additional plugins, you just pass the plugin objects
themselves to the Babel.transform call.

Sent from my phone.
On Jun 15, 2016 12:14 AM, "rmacklin" notifications@github.com wrote:

I'm interested in this. It would be nice if arbitrary Babel plugins were
supported. @Daniel15 https://github.com/Daniel15, would your package
allow additional plugins to be used?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#282 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAFnHf7C-OYinMm6k2UX11V11Oh0V4Ugks5qL6ZugaJpZM4Gap9I
.

@rmacklin
Copy link

rmacklin commented Jun 15, 2016

I also found this https://github.com/fnando/babel-schmooze-sprockets (based on https://github.com/Shopify/schmooze) which can use Babel 6 today.

Edit: babel-schmooze-sprockets is restricted to sprockets 4 (which is still in beta). I went ahead and created a similar sprockets plugin myself that works on sprockets 3 and has some extra stuff geared specifically toward migrating large codebases to ES6 modules (since that was my use case at work) but it also works for general purpose babel transpilation: https://github.com/rmacklin/sprockets-bumble_d

@guilleiguaran
Copy link

@tricknotes are you interested in a pull request with a solution for this based in babel-standalone by @Daniel15?

@pjg
Copy link

pjg commented Mar 10, 2017

What is the current status of this? Will we have Babel 6 support or is this still blocked? The two blocking issues mentioned in the description are closed at babel, so I think a workaround needs to be implemented for them.

@rmacklin
Copy link

@pjg Can you introduce node into your stack alongside ruby? If so, my recommendation would be to use babel on node. If you're using sprockets, you can use https://github.com/rmacklin/sprockets-bumble_d which bridges sprockets with babel running on node.

@itay-grudev
Copy link

Bump. It's almost 2018 and we are still stuck with Babel 5.x. Is there any chance this can be completed any time soon?

@pjg
Copy link

pjg commented Dec 4, 2017

I think the maintainers of this gem are just trying to tell us that Ruby and modern Javascript don't go well together (despite what @dhh et. al. would make you want to believe).

@guilleiguaran
Copy link

@pjg this project is out of control of Rails team, we have decided to embrace modern JavaScript using modern tools shipped directly from JS community, that's why we decided to support Yarn/Webpack directly in Rails with Webpacker (and yes, we can use the last version of Babel)

@pjg
Copy link

pjg commented Dec 7, 2017

Fair enough @guilleiguaran :)

@pedrofurtado
Copy link

Any progress in this issue? It's an important upgrade.

@brauliobo
Copy link

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.

10 participants