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.48k stars 1.82k forks source link

Allow customize error message #350

Open dartess opened 5 months ago

dartess commented 5 months ago

Now I get standard message like Try to reduce size or increase limit at .size-limit.json.

It would be great to be able to change this message, including setting a different message for different groups of files, like this:

  "size-limit": [
    {
      "path": "main.js",
      "limit": "500 ms",
      "message": "Call Hugo"
    },
    {
      "path": "page-index-*.js",
      "limit": "100 ms",
      "message": "Call Ghostbusters"
    },
  ]
ai commented 5 months ago

Please send PR