I have installed the npm package size-limit to monitor the size of my application. Following their documentation, I've written this in my package.json:
"scripts": {"size": "size-limit" },"size-limit": [ {"path": "./src/index.tsx","limit": "120 KB" } ],
But when running yarn size
I receive the following error:
/bin/sh: size-limit: command not found
.
Weird. When directly running yarn size-limit
I have:
error Command "size-limit" not found.
How to fix this?