browserslist file doesn't support comments
See original GitHub issueHey there, when I add a comment to the top of my browserslist file, I get the error:
BrowserslistError: Unknown browser query `# TODO: [my comment]`
at error (/home/site/node_modules/browserslist/index.js:37:11)
at /home/site/node_modules/browserslist/index.js:222:9
at Array.forEach (native)
at browserslist (/home/site/node_modules/browserslist/index.js:196:13)
at new BrowserSelection (/home/site/node_modules/doiuse/lib/browsers.js:17:18)
at missing (/home/site/node_modules/doiuse/lib/missing-support.js:76:18)
at doiuse (/home/site/node_modules/doiuse/lib/doiuse.js:42:25)
at /home/site/node_modules/stylelint/lib/rules/no-unsupported-browser-features/index.js:41:5
at Promise.resolve.then (/home/site/node_modules/stylelint/lib/lintSource.js:122:52)
This was surprising considering the example in the README:
# Browsers that we support
> 1%
Last 2 versions
IE 10 # sorry
I’m using browserslist 1.7.7.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
When Vite ignores your Browserslist configuration
Actually, Vite doesn't support Browserslist at all: the only reason it “seems” to work well with CSS is because Vite uses PostCSS, which...
Read more >Angular 12 warns about requested IE 11 support. Why?
If the Angular CLI compiler doesn't find a .browserslistrc file or a browserslist config in your package.json it will use the default config ......
Read more >Angular and Internet Explorer
Supporting Internet Explorer as a browser for your Angular 8.x or Angular 9.x application. ... Open the browserslist file in your IDE or...
Read more >Browser support [#3090862] | Drupal.org
Jump to comment: Most recent. The browsers in the browserslist in the package file don't meet the browser supported by Drupal ...
Read more >Introducing browserslist.dev
js if a browser doesn't support WebAssembly. If your browser isn't a part of the list, it doesn't mean our SDK won't work...
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 found problem — doiuse uses Browserslist in completely wrong way. I created a issue to fix it: https://github.com/anandthakker/doiuse/issues/67
Thanks for waiting 😃.
Hi @ai, check out https://github.com/ch2ch3/browserslist-comments. Run
npm install && npm run lint:css
and you should see the issue. I’ve added the debug log to the repository as well.