browserslist target throws when Babel can understand it
See original GitHub issueBug report
What is the current behavior?
Using the following .browserslistrc
that was generated a few weeks back with npx browserslist --mobile-to-desktop "> 0.5%, last 2 versions, Firefox ESR, not dead, not IE 11"
throws.
and_chr 91
and_ff 89
and_qq 10.4
and_uc 12.12
android 91
baidu 7.12
chrome 90
edge 91
firefox 78
ios_saf 12.4
kaios 2.5
op_mini all
op_mob 76
opera 76
safari 14
samsung 13.0
If the current behavior is a bug, please provide the steps to reproduce.
$ git clone https://github.com/eps1lon/webpack-targets-browserslist
$ yarn
$ yarn start
What is the expected behavior?
Webpack is able to understand this browserlist since Babel is able to. See https://github.com/babel/babel/issues/12123 for more context.
Other relevant information: webpack version: 5.52.0 Node.js version: 12.22.6 Operating System: Linux 5.4 Ubuntu 20.04.3 LTS (Focal Fossa) Additional tools: browserslist@4.17.0, caniuse-lite@1.0.30001255
Issue Analytics
- State:
- Created 2 years ago
- Comments:17 (8 by maintainers)
Top Results From Across the Web
babel/preset-env
@babel/preset-env takes any target environments you've specified and checks them against its mappings to compile a list of plugins and passes it to...
Read more >Why same browserslist option makes different target results
I 'm using browserslist option on package.json in two projects. One is react, and the other is next.js project. But I could find...
Read more >How to create a custom .browserlistrc for babel-preset-env
After you run the tool it'll generate a browserslist-stats.json giving you all the stats in a nice JSON file that Babel can understand....
Read more >How babel preset-env, core-js, and browserslistrc work together
Given modern JavaScript syntax as input, babel is able to transform it to compatible code that can run in any browser. To start...
Read more >@babel/preset-env - npm
If targets.browsers is not defined - the program will search browserslist file or package.json with browserslist field. The search will start ...
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 FreeTop 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
Top GitHub Comments
I improved docs https://github.com/browserslist/browserslist/commit/49af84894d7eb8a043f2b063f62efed71bb9ca09
Because
mobileToDesktop
is a specific Babel hack. It could leads to compatibility data losses for other tool