browserslist-vscode icon indicating copy to clipboard operation
browserslist-vscode copied to clipboard

Custom config file location

Open gian1200 opened this issue 1 year ago • 0 comments

Is it possible to define a custom .browserslistrc location? It currently defaults to ${workspaceFolder}.

https://github.com/browserslist/browserslist seems to support path and config options, but am not sure where to define them for the extension.

Use case:

Move config files to a .config folder.

browserslist docs:

https://github.com/browserslist/browserslist/blob/ee095bd1934a43f6a591acff7e8a3e05be86cf61/README.md?plain=1#L569-L590

If a query is missing, Browserslist will look for a config file.
You can provide a `path` option (that can be a file) to find the config file
relatively to it.


Options:


* `path`: file or a directory path to look for config file. Default is `.`.
* `env`: what environment section use from config. Default is `production`.
* `stats`: custom usage statistics data.
* `config`: path to config if you want to set it manually.
* `ignoreUnknownVersions`: do not throw on direct query (like `ie 12`).
  Default is `false`.
* `dangerousExtend`: Disable security checks for `extend` query.
  Default is `false`.
* `throwOnMissing`: throw an error if env is not found.
  Default is `false`.
* `mobileToDesktop`: Use desktop browsers if Can I Use doesn’t have data
  about this mobile version. Can I Use has only data about
  latest versions of mobile browsers. By default, `last 2 and_ff versions`
  returns `and_ff 90` and with this option it returns `and_ff 91, and_ff 90`.
  This option may lead to unknown browser version error (in example Can I Use
  doesn’t have data for `and_ff 91` yet). Default is `false`.

gian1200 avatar Sep 19 '24 22:09 gian1200