Would you consider to support
browserslist.config.json
and even
browserslist.config.js
browserslist.config.ts
as config files?
I am currently gathering some information and opinions about config files and conventions and wrote a short article about the the inconsistency that is going on at the moment and a proposal as a possible solution. What are your thoughts on this?
browserslist.config.js
There are 2 problems for JS config:
browserslist.config.json
I think we can add JSON format. But, to be honest, I do not want to add any features without explicit use cases.
It will require a lot of the time to discuss, maintain, fix bugs, solve compatibility problems (a lot of tools are using old Browserslist, which cause a conflict). Since our funding campain was not successful (and most of the companies and opinion leaders ignored by messages to help) I do not feel any motivation right now.
I see. I am very glad to hear that it would be at least a considerable. In my opinion the support for the JSON format on it's own would already be a huge deal. As described in my article I am not a big fan of using package.json for configuration data, allowing a self contained browserslist.config.json would make a big difference and has some real use cases:
package.jsonfile and use JSON as a standard config format (as in tsconfig.json)JSON in .browserlistrc at least would be consistent with .prettierrc which is more common to see. Don't get me wrong I like TOML but most of the projects looking to add a .browserslist probably have a .prettierrc file anyway. Additionally, as a developer affordance, it would be apt to allow the file to be named .browserlistrc or detect the misspelling and fail if it's found.
What's in it for you? More potential funding opportunities as individuals who crave consistency will be less likely to bury their browserslist config in the package manifest. Also, if you want more funding consider updating this page to add .browserslistrc.
Hey folks, any updates on that?
TBH this is really a pain in the ass in case of monorepo, when you want to share a bunch of configs for different tools, but you have to implement a separate package specifically for BL shareable config. Looks like a some hack.
- I like to allow other languages to parse Browserslist. For instance, in Autoprefixer Rails I use Ruby code to parse the file. In the past Compass parsed it as well.
Totally agree on that, so seems like for other languages default browserslistrc fits perfectly, but for a such heavily relied package as Browserslist in front-end community it would be extremely helpful to support some implicit common practice, like giving the ability to set up configuration in js file, etc.
Hey folks, any updates on that?
Our fundraising campaign is still not effective and still, nobody is helping us on Twitter.
Since we are spending all our free time on PostCSS 8, we do not have time for JSON format.
front-end community it would be extremely helpful to support some implicit common practice, like giving the ability to set up configuration in js file, etc.
JS file is bad for the cache as I mentioned above. The front-end ecosystem is full of bad practices. I highly suggest to not copy practices just because they are popular.
But we are always open for rational arguments or to new ideas if you find a way to avid blockers.
Most helpful comment
I see. I am very glad to hear that it would be at least a considerable. In my opinion the support for the
JSONformat on it's own would already be a huge deal. As described in my article I am not a big fan of usingpackage.jsonfor configuration data, allowing a self containedbrowserslist.config.jsonwould make a big difference and has some real use cases:package.jsonfile and useJSONas a standard config format (as in tsconfig.json)