-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Option to filter reported sections or allow passing custom options via command line #200
Comments
Do you have an idea how to fix it? |
Take a look at #201 and let me know what you think. |
Will it be a better idea to pass environment variable? Like: SHOW_WHY_FOR=3 npx size-limit Environment variable is more easy to use in your code ( |
Yeah, using environment variables is an option. My current workaround is to refer to the package directly after reviewing the bundle sizes.
I understand if you feel this is not the right direction for this library given I can already introspect the packages individually. |
We can add Do you like this API? You can send PR. |
I have a monorepo with dozens of libraries. The value exported by the
.size-limit.js
module is built dynamically as an array of sections (i.e.{name: string, path: string}[]
). Running the script with the--why
option opens dozens of tabs on my browser. Ideally, I can pick one or more sections for introspection.I tried passing custom options to modify the generated configuration, but
size-limit
bails when unknown options are passed via the command line. Ignoring unknown options is also a good enough solution for me as that would allow me to use a custom option to filter the results.The text was updated successfully, but these errors were encountered: