-
-
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
State of targeting browers #3774
Comments
Potential solutionsSolving speed, configuration hell, and defaultsWhat if pre-eject we loaded and identified the targeted browsers ourselves? This would fix any speed concerns and allow us to enforce a default other than what browserslist determines (we want our default to be Solving
|
Can you clarify this? I’d assume it’s only queried once during startup. (Okay, twice: by autoprefixer and babel-preset-env.) Is that not the case?
I think it’s not too bad if we add a post-build message to production build with the chosen browserlist when it differs from the one in
Do you only mean browserlist location? I would expect speed to be no worse since run the same number of transforms or less. (Speaking for the app code only.)
We could also go the other way and compile everything by default, skipping things that we know to be compatible. Maybe with caching it won’t be too bad? |
Fueled by this issue: webpack-contrib/eslint-loader#206. I just want to make sure
I'm OK with this.
Yes, strictly browserslist location.
Are we confident babel 7 will no longer break code? If so, this might be fine -- but I'd almost rather make compilation opt-in via edit: then again, there's not really a good way to let users specify browser support -- just Node support. We need to talk more about this. |
Merging into #3777, we hashed this out. |
@Timer thanks for all the efforts you are putting into browser targeting! |
I think we've all agreed targeting browsers would be an acceptable configuration. For 2.0, we tried giving this a shot -- here's the current state:
Parsing target browsers (#3644)
This change told our build pipeline to start looking for
browserslist
configuration.When this was merged, the only real effect it had was CSS prefixing. It was not a complete implementation.
Our Babel configuration was still locked down to ES5.
Concerns
browserslist
inpackage.json
, but we now support 5 means of configuration. I think we need to lock this down.browserslist
default.Minifying code ES6+
We know we want to support the latest syntax, so we merged #3618 -- this PR switched us from
uglify-js
touglify-es
under the hood, which supports new syntax.Concerns
node_modules
with bad syntax leak into the build without being checked.uglify-es
and does not actually limit syntax support in any way.Outputting ES6+ code
Since #3644 didn't affect our compilation process, #3770 was merged.
#3770 removes our forced IE9/Uglify compatibility and instead lets
@babel/preset-env
use its new behavior of identifiying browser support viabrowserslist
.Concerns are shared with above:
node_module
validityCompiling
node_modules
Yet to be solved.
Concerns
engines
fieldThe text was updated successfully, but these errors were encountered: