-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Make target browsers configurable #1249
Conversation
TODO: this likely requires switching to Babili. https://github.com/babel/babili |
Similarly had an issue with webpack 1 since it's using an older version of acorn for |
Note, that I am planning to add The only issue with this CRA |
My only concern with |
Alternatively we could add |
Yeah totally true, didn't even think of that! Could just alias it to node 0.10/0.12 although diff for webpack 2 |
Another todo: make sure builds are reproducible |
development/production environment are planned too with same ETA 😊 |
Sounds great. This is a bit of a longer term project so I’m in no rush. It’ll take a while to work out most issues and get this to a stable state. |
Please enlighten me! Why different browsers in development and production? Is it because of easier-to-read compiled code? What about when I need to fix those nasty IE 11 or Safari 9 bugs (which require certain vendor prefixes, for instance)? |
@lydell I asked for feedback in Autoprefixer twitter. Maybe some user have good use cases for environments (maybe not only development/production). |
I think it's up to developers to decide for themselves. Personally I'd use a lighter setting in development for better compiled output and errors, especially in code heavy with async/await or generators. But I’m the kind of person to test features with production settings before merging. It’s not safe if you don’t do this kind of testing so I’d make them match by default and document it somewhere that it is possible to loosen it up if you know what you’re doing. |
It would be nice if this config also loaded required core-js poly and ideally inlined them via babel-runtime |
👍 Yeah, that's the plan. |
Browserslist 1.5 was released with @hzoo I really need your feedback. Please do not ignore my messages :). |
Autoprefixer 6.6 is out with |
// We always include this plugin regardless of environment | ||
// because of a Babel bug that breaks object rest/spread without it: | ||
// https://github.com/babel/babel/issues/4851 | ||
require.resolve('babel-plugin-transform-es2015-parameters'), |
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.
I think this was fixed in babel@6.22.0
.
Thoughts on this -> https://philipwalton.com/articles/deploying-es2015-code-in-production-today/ |
Proof of concept for #892.
Doesn't work with ejecting yet.
Both autoprefixer and Babel are driven by a config like this in
package.json
:Currently I throw if it doesn't exist since I could generate a reasonable config by default (e.g. "last two versions" for development) in new projects and ask old projects to include it during migration. In a way this would be "configuration" but actually sensible one. I don't have a strong opinion here though.