aklinker1 / vite-plugin-web-extension

Vite plugin for developing Chrome/Web Extensions
https://vite-plugin-web-extension.aklinker1.io/
MIT License
553 stars 48 forks source link

Clearer manifest validation error messages #51

Closed r2dev2 closed 1 year ago

r2dev2 commented 1 year ago

I used vite-plugin-web-extension to build an extension. When I ran vite (in production mode), I got the following error:

no error msg given

The manifest is invalid as there is no version field specified. I investigated the bundle for vite-plugin-web-extension,

debug err object plugin code

It seems like the plugin is filtering for non-empty instancePath when showing errors which is why the error is not showing. Can you fix the error logging to handle this scenario. Something like Manifest must have required property 'version' would be a nice error message.

aklinker1 commented 1 year ago

Hmm, good find. This is fixed in V2 (I just log the entire errors array), but I can put out a patch that cleans this up in v1

aklinker1 commented 1 year ago

Released in v1.4.5