- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 27.1k
 
Description
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
- Speed: what effect does this have on build time? Previously, we fed the configuration that now needs to be found (potentially found thousands of times depending on the build pipeline plugin efficiency)
 - Configuration hell: We wanted to support 
browserslistinpackage.json, but we now support 5 means of configuration. I think we need to lock this down. - What happens when nothing is specified? I'm not sure if we align with the 
browserslistdefault. 
Minifying code ES6+
We know we want to support the latest syntax, so we merged #3618 -- this PR switched us from uglify-js to uglify-es under the hood, which supports new syntax.
Concerns
- This now lets 
node_moduleswith bad syntax leak into the build without being checked. - Specify JavaScript version for Uglify #3743 tried to solve this but upon further digging, the option is used twice in 
uglify-esand 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 via browserslist.
Concerns are shared with above:
- Speed -- what kind of performance hits are we going to see?
 - Configuration hell (see above).
 node_modulevalidity- Defaults when nothing is specified?
 
Compiling node_modules
Yet to be solved.
Concerns
- Not all packages specify an 
enginesfield