slogsdon / parcel-plugin-fable

Parcel asset type plugin for Fable
https://www.npmjs.com/package/parcel-plugin-fable
MIT License
21 stars 4 forks source link

Reporting errors #8

Open alfonsogarciacaro opened 6 years ago

alfonsogarciacaro commented 6 years ago

Do you know how errors are reported in Parcel plugins? I tried to use console.error/warn but it seems logs are overwritten if they run in the same process. Also, with the Webpack loader we mark files with errors as non-cacheable to make sure the bundler will recompile the file again (sometimes an error is fixed by modifying a different file), is there something similar with Parcel?

slogsdon commented 6 years ago

In 58a07b8fc19558cc409737b0573de13d40d69f50, I changed the plugin to use Parcel's own Logger for outputting warnings and errors to the developer as it uses readline support to adjust cursor position in the terminal while running.

I'll have to look to see if assets that cause an error during compilation need to be flagged in anyway in order to be recompiled on change.