ai / size-limit

Calculate the real cost to run your JS app or lib to keep good performance. Show error in pull request if the cost exceeds the limit.
MIT License
6.56k stars 1.82k forks source link

Prints "Adding to empty webpack project" to stderr #250

Closed anilanar closed 3 years ago

anilanar commented 3 years ago

yarn size-limit prints "Adding to empty webpack project" at the beginning and yarn size-limit 2> /dev/null does not. That means size-limit prints "Adding to empty webpack project" into stderr which is considered a warning/error by some CI tools and causes CI to fail.

We can ignore that output by using 2> /dev/null but that can cause loss of valuable information if/when something actually goes wrong.

Q: Why print to stderr instead of stdout?

ai commented 3 years ago

We are printing to stderr to be able to save results in a file without loaders:

npx size-limit > result.txt

mico-spinner, as I believe, uses a logic “what is not main result should be in stderr”.

I can change stream if you give me some proofs, that it is not UNIX way or something similar.

anilanar commented 3 years ago

Makes sense, thanks :+1: