When a build result contains errors it also doesn't include the metafile object in it, which makes the plugin throw an Expected metafile, but it does not exist. error.
This is quite annoying because every time there's a mistake in code in watch mode it pollutes the entire console with this error, instead of showing only the actual code error.
I think a simple solution would be to simply return early if result.errors.length is truthy, and then if there are no errors but still metafile is missing we can throw that error.
After such change it shows only the code error as expected.
When a build result contains errors it also doesn't include the
metafile
object in it, which makes the plugin throw anExpected metafile, but it does not exist.
error.This is quite annoying because every time there's a mistake in code in watch mode it pollutes the entire console with this error, instead of showing only the actual code error.
I think a simple solution would be to simply return early if
result.errors.length
is truthy, and then if there are no errors but stillmetafile
is missing we can throw that error.After such change it shows only the code error as expected.