-
Notifications
You must be signed in to change notification settings - Fork 86
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 if plugin cant load next.config.js #99
Conversation
c844753
to
4a18b0f
Compare
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.
👍 For more error handling.
I think we should pass the original error as suggested here to make it easier for users to self serve
@@ -5,15 +5,15 @@ const isStaticExportProject = require('./isStaticExportProject') | |||
const doesSiteUseNextOnNetlify = require('./doesSiteUseNextOnNetlify') | |||
const hasCorrectNextConfig = require('./hasCorrectNextConfig') | |||
|
|||
const doesNotNeedPlugin = async ({ netlifyConfig, packageJson }) => { | |||
const doesNotNeedPlugin = async ({ netlifyConfig, packageJson, utils }) => { |
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.
[dust] should we pass only failBuild
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.
i was trying to keep it on the same level as netlifyConfig and packageJson, as in they're all things that get passed to the different event handlers (i.e onBuild) so i think it's ok? will keep in mind tho going forward
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.
Thanks @lindsaylevine!
Co-authored-by: Erez Rokah <[email protected]>
Fixes #78
Fixes #79
not 100% sure about trying to pass in the exact error from the catch into
failBuild
, open to thoughts!