Make target browsers configurable
See original GitHub issueImagine package.json
like this:
"browsers": {
"development": "last 1 version",
"production": "last 2 versions, > 5%"
}
The format is the same as browserslist.
Then, we would use this information both for Babel and Autoprefixer.
Autoprefixer already supports this format of browser configuration.
We could teach babel-preset-env to honor it too, or we could write a helper that translates browserslist
to its target
.
This would solve #435 with some optional configuration.
It would make rebuilds faster and also make output less mangled without introducing sourcemaps, helping work around #139.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:44
- Comments:46 (32 by maintainers)
Top Results From Across the Web
Serve modern code to modern browsers for faster page loads
Use the targets field to specify which browser versions you want to include by adding an appropriate query to the browsers field. @babel/preset- ......
Read more >Target | webpack
Target. Webpack can compile for multiple environments or targets. ... Defaults to 'browserslist' or to 'web' when no browserslist configuration was found.
Read more >TypeScript target | webhint documentation
typescript-config/target takes into account your webhint 's browserslist configuration and warns you if your target ( es3 , es2015 , etc.) is appropriate....
Read more >Make Chrome default browser (Windows 10) - Google Support
Make Chrome default browser (Windows 10). As an administrator, you may need to configure Chrome as the default browser on computers in your...
Read more >Build targets - Configuration - Ember Guides
That is why Ember CLI exposes a way of configuring what browsers your app targets ... If you want to target all browsers...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Any updates on this @gaearon, the application I am working on, we only support Chrome, I hope the bundle size will decrease a lot if we have this working
👍 and FYI we have https://github.com/babel/babel-preset-env/pull/19 in progress as an option already so that’s a start 😄