-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 #778
Update to Babel 6 #778
Conversation
Thanks! I'm going to check this out--really appreciate it. That underscore issue is really annoying.. |
Coincidentally, the |
Do you have a link to info on that bugfix and/or how it relates? I'm curious.. |
@quicksnap: This was the original Babel issue: https://phabricator.babeljs.io/T2455 I'm not exactly clear on the whole thing though since the v8 bug is about Unicode but the Babel issue has a repro that doesn't contain special Unicode characters... |
Thank you! These changes worked for my stack - which has been moderately altered from the beginning point of this boiler plate! I did have a bunch of syntax that no longer worked though. It was simple enough to fix those - but I'm getting strange run-time bugs now - like Edit: this.setState() bug was actually a promises bug because I was behind a few versions on some of my webpack npm modules were out of date (but didn't show up in the PR diff here because they were up to date for y'all). Thanks again! All is looking smooth - really appreciate the migration help! |
|
||
// Webpack config for development | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
var webpack = require('webpack'); | ||
var WebpackIsomorphicTools = require('webpack-isomorphic-tools'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm why was this removed? Not needed anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, to my understanding the non-plugin version of webpack-isomorphic-tools is only required for server-side patching of the require
function, which should be covered here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But as it is not really related, I can squash and move this change as well as the (alphabetical) reordering of npm packages into a separate cleanup commit, should this be approved.
I tried out this PR on a clean installation of react-redux-universal-hot-example and it works, but one caveat: Babel 6.4 requires a semi colon after class properties. This required trivial changes (added semicolons) to the following files:
|
i’d rather use babel 6.3 until babel 6.5 (or 6.4.x) reverts that PR (as described in the PR) |
Which one has more chances to be merged, PR #759 or this one? |
This one most likely, as it's much smaller. |
OK, 6.5.2 has it reverted! |
@@ -124,28 +140,26 @@ | |||
}, | |||
"devDependencies": { | |||
"autoprefixer-loader": "^3.1.0", | |||
"babel-core": "~5.8.33", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why some packages were moved to from devDependencies to dependencies?
Any word on this babel 6 migration? |
I personally would not like to merge until I've tested Babel 6 on my fork of the project (that is used at work). If anyone out there is using these changes already, would love to hear feedback. I will probably try to migrate our project to Babel 6 sometime in the next few weeks. I've spun up a test project and Babel 6 has been playing nicely. So long as the legacy-decorators thing works fine, I don't foresee any big issues 🎱 |
I've been using Babel 6 on my project for a month and it's been mostly smooth sailing. The |
I've been using Babel 6 with my project for a couple weeks now. I was seeing the |
I'm about to start a new project, I'd love to see this merged. |
@disbelief I got that same error. Upgrading to node 5 now. |
I will be giving this a go later in the month. |
ditto: would love to see this merged. Thanks. |
I did a test merge locally of this branch into master, and after some easy conflict resolution, project ran just fine. |
@psalz could you resolve the merge conflicts and I'll try to merge it in after giving it a whirl. |
I haven't heard much of @psalz on this PR. If anyone else wants to open up a PR with his changes rebased, we can move forward. |
(Not trying to rush you @psalz! Thanks for the work on this PR =) |
Update to Babel 6 (replaces #778)
Closed by #935. Thanks @psalz and @josmardias! |
@joshhunt appreciated..! |
Thanks @josmardias |
I'm aware that there is another pull request for this (#730), but since its humongous, I wanted to share my take on it.
Note that the
loose
option was removed in Babel 6, so the output is expected to be different. There is an unofficial preset for loose ES2015, but I haven't checked it out yet.Everything seems to be working as expected, except for the fact that issue #14 has re-emerged somehow (even with the underscore hack). However, running the respective command (e.g.
npm run dev
) a second time has always fixed it for me so far.I also changed the way the build command is executed to ensure that everything within
prod.config.js
is running withNODE_ENV=production
. This is for example required for Babel not to include thetypecheck
plugin within the build.