-
Notifications
You must be signed in to change notification settings - Fork 916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fail build when Webpack produces warnings or errors #1842
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/pikapkg/snowpack/pkq89zsxa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 conceptually! Added two small comments on implementation
No worries about the master branch, I believe those are outdated commits from back when we were juggling the old and new docs sites. We'll delete that branch as soon as all PRs are no longer targeting it. |
Thanks! |
Thank you so much! |
Fixes #1527
Changes
This change makes the Snowpack build fail when Webpack produces errors.
It also adds an option to fail the build on warnings as well as that also often indicates some misconfiguration. Failure on warnings is however optional and is disabled by default to be non-breaking. I was not sure here whether this should be the default.
Testing
I tested it manually by linking the plugin against a snowpack build that succeeded despite having errors.
However the error message I returned in the reject method does not show up in the log. Is this expected?
Docs
I updated the docs of the plugin to reflect the new option.