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

feat: implement new --config arg to specify a custom path to configuration file when running CLI #382

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

EvgenyWas
Copy link
Contributor

@EvgenyWas EvgenyWas commented Jan 28, 2025

This PR introduces a new --config argument to specify a custom path to the size-limit configuration file when running CLI.

Resolves #367

Further enhancement:

  • add validation for config extension to throw a custom size-limit error. Currently, it will be Error: No loader specified for extension ".extension";
  • catch an error if there is no such file or directory from the parameter to throw a custom size-limit error. Currently, it will be Error: no such file or directory....

@EvgenyWas EvgenyWas marked this pull request as ready for review January 28, 2025 17:35
@ai
Copy link
Owner

ai commented Jan 28, 2025

Looks good. I am a little busy, I will try to merge it this week

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

Successfully merging this pull request may close these issues.

Can the config option be supported like eslint or stylelint to specify the path of the configuration file?
2 participants