-
Notifications
You must be signed in to change notification settings - Fork 88
Babel 6 #46
Comments
👍 want this |
👍 |
1 similar comment
+1 |
Please, don't +1 the issue, it doesn't help at all. I'm aware Babel 6 is out and I'll support it in the next release. |
I'm trying to make a PR, but can't for the life of me figure out where It's used by the As you can probably tell, this is my first attempt at babel plugins, so I'm not familiar with the ecosystem... |
It's not really important, from what I remember. I just copied it because that's what other plugins were using, but I think it can be replaced by simple babel CLI call. You can take inspiration from any Babel plugin here: https://github.com/babel/babel/tree/development/packages. |
Thanks, will look into it and report back if/when I have something. |
I've made some progress on this |
options should be passed like so presets: ['es2015', 'react'],
plugins: [
['transform-object-rest-spread'],
['transform-class-properties'],
['react-transform', {
transforms: [
{
transform: 'react-transform-hmr',
imports: ['react'],
locals: ['module'],
}, {
transform: 'react-transform-catch-errors',
imports: ['react', 'redbox-react'],
},
],
}],
], |
@chicoxyzzy thanks , I didn't know how to add |
Nice, @chicoxyzzy. I haven't been able to get very far, no – and I unfortunately can't get around to look any more into it before tomorrow. Please keep up your good work 😃 : |
We should make a Babel 6 preset for HMR + error catching. |
Just threw it together and haven't tested yet but: https://github.com/danmartinez101/babel-preset-react-hmre Is this on the right track, @gaearon ? |
Yep @danmartinez101 it looks ok. But first of all we need to:
I'll try my best to fix it but I'll be very busy next two weeks. Anyway feel free to ping me if you think I can help. |
Need to wait until babel-plugin-react-transform is ready for Babel 6. Related to gaearon/babel-plugin-react-transform#46.
I've created a pull request on chicoxyzzy#1 which updates the tests to use babel 6. All but the Vanilla test on that branch now throw an error
|
@buildmaster I just checked your PR. If you will
that's because there is no |
ok I've copied the command from the old babel-plugin bin, but means a dev requirement on babel-cli as well. |
ok made a couple of updates, but I think I'm at the limit of my knowledge, so might have to wait for someone who knows how the plugin actually works to pick up the fix |
@buildmaster @chicoxyzzy I think this is the easiest way to do it, yeah – that's how I did it in my (still unpushed) branch too. Not sure you need the At any rate, this will be quite a bit bigger than simply changing the plugin export… especially due to fixing the tests, which I don't have any experience with. Is anyone close to having a complete PR on this? |
Good work @TaopaiC and @buildmaster! I've merged your commits! Now we should fix |
@gaearon should I create WIP PR so everyone will be able to help and track progress more comfortably? |
is any news in here? |
Please feel free to create a PR. |
here it is #48 |
React router is 1.0.0 now React is 0.14.2 I'm waiting on gaearon/babel-plugin-react-transform#46 to upgrade to babel 6.0. Migration should be similar to this: zackify/react-router@b3fb1f8
I have no idea how babel or this plugin work so I'm going to start hacking away in a different fork for now. This is the approach I'm planning on taking:
Once I get through all or most of this, I can either apply what I've learned to the branch created above, or we can just go with this one ( assuming that it actually works, of course... and that is a big assumption :P ) Edit: I'm also using jasmine so I can focus on writing tests instead of figuring out how to configure mocha but these can be converted to mocha easily later |
Just throwing in this amazing new reference: https://github.com/thejameskyle/babel-plugin-handbook |
I started reading that last night; it has helped a lot already :D :D I was planning on seeing if parts of the plugin could be improved, but want to get through tests and upgrade first to make sure I really understand it. I'm hoping to get it wrapped up tonight. |
I'm also thinking that https://github.com/babel/babel/tree/master/packages/babel-template is going to be useful here. |
@danmartinez101 for sure— @gaearon what do you think is incorrect with respect to |
how's it going? |
any luck with this? |
Please track #50 instead. I will soon have time to release it & related packages. |
Babel 6 was just released and has a new plugin API. Assuming this plugin will need to be updated to support it (otherwise can just close this issue).
The text was updated successfully, but these errors were encountered: