question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make target browsers configurable

See original GitHub issue

Imagine 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:closed
  • Created 7 years ago
  • Reactions:44
  • Comments:46 (32 by maintainers)

github_iconTop GitHub Comments

4reactions
mohammedzamakhancommented, Aug 29, 2017

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

4reactions
hzoocommented, Oct 11, 2016

👍 and FYI we have https://github.com/babel/babel-preset-env/pull/19 in progress as an option already so that’s a start 😄

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found