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.

Support browserlist environments

See original GitHub issue

I’m trying to use with environment

[production]
cover 99.5% in BR
ios_saf >= 8
not dead
not ie > 0
not ie_mob > 0
safari >= 7
chrome >= 52

[development]
last 2 versions
not dead

As you can see… for production, should support safari >= 7

In fact… if I run…

> NODE_ENV=production npx browserslist
...
safari 11.1
safari 11
safari 10.1
safari 10
safari 9.1
safari 9
safari 8
safari 7.1
safari 7
samsung 11.1
...

In my .eslintrc.js I have…

module.exports = {
    root: true,
    extends: [
        'eslint:recommended',
        'plugin:prettier/recommended',
        'plugin:react/recommended',
        'plugin:react-hooks/recommended',
        'plugin:compat/recommended',
    ],
   // ...
}

But still I’m receiving lint errors…

❯ NODE_ENV=production eslint --ext .js --ext .jsx src
/Users/ridermansb/Projects/web/src/App.jsx
  92:35  error  BroadcastChannel is not supported in Safari 7, Chrome 36  compat/compat
  93:33  error  BroadcastChannel is not supported in Safari 7, Chrome 36  compat/compat

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
amilajackcommented, May 29, 2020

Babel cannot polyfill BroadcastChannel. It only polyfills ES APIs. BroadcastChannel is a web api.

0reactions
amilajackcommented, May 31, 2020

The plugin asserts that APIs exist in all your target environments

Read more comments on GitHub >

github_iconTop Results From Across the Web

browserslist/browserslist: Share target browsers ... - GitHub
Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-preset-env - GitHub - browserslist/browserslist: Share ...
Read more >
babel/preset-env
babel/preset-env` is a smart preset that allows you to use the latest JavaScript without needing to micromanage which syntax transforms (and optionally, ...
Read more >
Serve modern code to modern browsers for faster page loads
A full list of compatible queries is in the browserslist documentation. Another option is to use a .browserslistrc file to list the environments...
Read more >
Speed up with Browserslist - DEV Community ‍ ‍
Here, Browserslist will help you with it ability to declare several environments in a configuration file: [modern] last 2 versions last 1 ...
Read more >
How to create a custom .browserlistrc for babel-preset-env
This config reads from browserslist-stats.json and it supports browser versions that represents 0.25% or more. Let's look into how your custom config differs ......
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