-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Fix babel-preset-env
.
#765
Conversation
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.
👏
webpack.prod.js
Outdated
@@ -3,6 +3,7 @@ const path = require('path'); | |||
const webpack = require('webpack'); | |||
const merge = require('webpack-merge'); | |||
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |||
const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); |
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.
Should be UglifyJsPlugin
(lowercase "s").
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.
Yup, already figured that out, thank you. This PR in general is throwing some really weird errors about components not being mounted (after this line is fixed), please check it out if you get a chance.
5911497
to
99b0e69
Compare
d7eb24a
to
f14360e
Compare
OK, here is the problem with React Hot Loader: gaearon/react-hot-loader#695. |
9ffa3b6
to
fbdcb3f
Compare
React Hot Loader was removed in 1.0, so this should be good to merge now. We'll need to consider this if we ever add React Hot Loader in again, but they are working on fixing the problem, so hopefully it will be resolved by then. |
Deploy preview for cms-demo ready! Built with commit cd3e623 |
@erquhart already reviewed this, do you want me to just merge? |
Yep, go for it |
Added node 6 as a target, should pass now. |
@erquhart Should we just upgrade our test environment? |
Keeping it this way allows contributors with Node 6 to still run the test suite. I don't believe this affects the build output - if it does, upgrading is worth considering. |
@erquhart Hmm, Node 6 is still supported, so I guess we could. Just doesn't make very much sense to me to transpile stuff just for our test environment when all the browsers support it. I wouldn't want to do it on a conditional, though, that could cause more problems (tests pass, in browser doesn't). |
That's what I don't know - are we transpiling for node in the build or just on the fly during testing? |
It appears this does impact the build. Odd. Also, it appears we're now in a parallel universe where browsers support pretty much everything natively? Honestly, I'd hate to require Node 7+. Performance matters, but we're not exactly dying in that department. I vote we open a separate issue about it and keep this one focused on using babel-preset-env. |
I'm good with that, feel free to merge. Here is what we are currently transpiling with
So, as soon as Edge 17 gets released, all current JS features that we use will be supported ("last 2 versions"). 😲 |
@erquhart We could use
I'm not sure I'd want the build to be different than the test environment, though, any thoughts? |
Hmm, but then if you run a build on an old node version (v4?) it will transpile a whole bunch of stuff. @erquhart I guess the core question is still whether we want to have the build and test environment transpiling the same things (like you have now), or different? |
Yeah we don't want to depend on the build environment, I think that makes more sense for actual Node apps.
We could maybe run production releases without Node 6 support, but all other commands (including a non-production build command) still support it. Not transpiling anything once Edge 17 drops (maybe Q2/Q3 based on recent major release dates?) is super compelling. |
Do you think there could be any problems having our production env different from our dev one? |
Only if there are bugs in the browser implementations of the features we're not polyfilling, which is a really great point. Maybe just for running tests, then, since that's the only time Node would be executing our code. |
You're still having a different environment for your tests vs your build then. |
The only difference is in browser implementations of those features vs the babel polyfills running for the tests, so a browser specific bug is the only thing that would slip through, and that's no different from what we're already doing (since our unit tests aren't running against multiple browsers). |
This reverts commit ddbfae6.
This reverts commit ddbfae6.
This reverts commit ddbfae6.
This reverts commit ddbfae6.
- Summary
We added
babel-preset-env
before, but I was using the docs for the beta version instead of the released version, so it was actually still transpiling everything instead of just the stuff we needed.- Test plan
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)