Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

findConfig is a noop instead of throwing an error #826

Open
tomzv opened this issue Apr 9, 2024 · 1 comment
Open

findConfig is a noop instead of throwing an error #826

tomzv opened this issue Apr 9, 2024 · 1 comment

Comments

@tomzv
Copy link

tomzv commented Apr 9, 2024

Hello, when creating a browserslist instance, the options object you can provide can include a path property that provides, according to the README file -> file or a directory path to look for config file.

When providing the path property in a browser environment, it just silently results in a noop when calling findConfig(), unlike when for example providing the config argument, (which throws an error when calling loadConfig() from the browser).

Wouldn't it be preferable to throw an error for the path property as well, to alert the user of the library of the fact that the path argument behaves differently in the browser? Is there a specific reason for the noop as opposed to throwing an error message?

@ai
Copy link
Member

ai commented Apr 9, 2024

Nope. postcss for instance require path (to CSS file) and pass it to Browserslist always. Even in browser’s envrionment.

Also it will be a breaking change and release major updates is a huge problem for library like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants