Skip to content
This repository has been archived by the owner on Sep 11, 2018. It is now read-only.

Upgrade Babel to ^6.0.0 #150

Closed
dvdzkwsk opened this issue Oct 29, 2015 · 15 comments
Closed

Upgrade Babel to ^6.0.0 #150

dvdzkwsk opened this issue Oct 29, 2015 · 15 comments

Comments

@dvdzkwsk
Copy link
Owner

Would be great to get this done as soon as possible; keeping an eye on babel/babel-loader#123.

@justingreenberg
Copy link
Contributor

[email protected] has been released with babel 6 api support just have to wait for some other deps to catch up—specifically the react-transform plugin and related repos. you can follow the discussion here (dan indicates support is coming with next release, sometime in the next couple weeks). i'm tracking this closely and will submit pr when deps are ready

@dvdzkwsk
Copy link
Owner Author

dvdzkwsk commented Nov 3, 2015

Awesome, thanks. I was naive in thinking that once babel-loader was caught up that would be most of it.

@starandtina
Copy link

Is there any update for it?

@dvdzkwsk
Copy link
Owner Author

@starandtina I've had a difficult time figuring out where react-transform/hot-reload and redbox-react are, so hopefully within the next week or so this will finally be @ babel 6. The process has just gotten harder since babel disabled github issues.

@justingreenberg
Copy link
Contributor

there is an open PR on react-transform from this fork using babel 6—tested with fork of react-transform-boilerplate reference implementation... hot module reloading, error catching etc are all working. we're just waiting for the author to review and merge.

also, to support eslint we'll need to wait for babel ast conversion to esprima, which is also in the works

@dvdzkwsk
Copy link
Owner Author

Thanks @justingreenberg, I just stumbled upon gaearon/babel-plugin-react-transform#50 before seeing your edit so it looks like you're far ahead of me.

This was referenced Dec 1, 2015
@dvdzkwsk
Copy link
Owner Author

dvdzkwsk commented Dec 8, 2015

@justingreenberg looks like gaearon/babel-plugin-react-transform#50 just got merged and a pre-release is on the way later today.

@justingreenberg
Copy link
Contributor

@davezuko Awesome! I already have a working branch of starter kit with my local fork of react-transform. Just have to fetch, merge, and review recent commits. I'm meetings until around 4pm EST, will submit PR today whether pre-release get pushed or not :)

@dvdzkwsk
Copy link
Owner Author

dvdzkwsk commented Dec 8, 2015

Thanks! You're the best haha; I feel like every issue thread I'm in I see you with a PR or something. Anyways, looking forward to it; the test setup will probably have to change a bit now that isparta is on babel 6 (iirc), but either way super excited to finally get this moving!

@justingreenberg
Copy link
Contributor

I really got sucked in. Babel and Webpack were always kinda just magic to me. Dan's move to london and resulting delay in react-transform ended up being a blessing in disguise—it forced me to sit down read the babel source like a book and totally demystified the ecosystem. Now I'm hooked lol :)

@dvdzkwsk
Copy link
Owner Author

dvdzkwsk commented Dec 8, 2015

Not to sidetrack this too much, but is that what helped you the most (reading the source)? Babel is still mostly a black box to me despite some of the talks I've watched... so I'm going to be going through https://github.com/thejameskyle/babel-plugin-handbook today and then maybe dig into the source later.

@justingreenberg
Copy link
Contributor

babel-plugin-handbook is by far the most comprehensive resource—I strongly recommend starting there.

@thejameskyle really does an awesome job introducing and breaking down the internals:

  • parsing code → lexical [tokens] → syntax tree [AST])
  • traversing nodes (visitors, paths, scope, binding)
  • transforming nodes in the AST

Babel's API surface is surprisingly small.

Since bascially everything is a plugin in v6, there are a ton of examples in babel-packages—everything from syntax suport (babel-plugin-syntax-jsx) to transforms (babel-register, which traverses an entry module and transpiles all downstream imports/requires).

you can grok most of the packages pretty easily in a few minutes (they are tiny, many are < 50 LOC)

@justingreenberg
Copy link
Contributor

Also FYI, hidden away in the documentation branch of his personal babel fork, james has started work on documenting the module APIs—currently there's babel-traverse and babel-types

@dvdzkwsk
Copy link
Owner Author

dvdzkwsk commented Dec 8, 2015

Thanks a bunch, I'll devote some time to reading through all these when I can.

@dvdzkwsk
Copy link
Owner Author

Closing this for now since it's been merged; additional issues are welcome for any bugs that may arise. Thanks for all your work @justingreenberg!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants