Skip to content

Better error message if file is missing #221

Open
@ivanhofer

Description

@ivanhofer

It took me a while to realize what was wrong: the file I tried to test was missing, because I forgot to build my library before I ran npm size-limit.

I got following error message:

✖ Adding to empty webpack project
 ERROR  WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

It would be a nice UX improvements when the error could be catched and a "human-readable" error message would be displayed instead. Something like: "Could not test {{name}} because file '{{path}}' is missing"

used package-versions:

@size-limit/preset-app: ^4.10.2
@size-limit/webpack: 4.10.2
size-limit: 4.10.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions