-
Notifications
You must be signed in to change notification settings - Fork 18
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
fix: prevent reach-router dep requirement for v2 #557
Conversation
✅ Deploy Preview for netlify-plugin-gatsby-demo canceled.
|
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.
This looks good to me since we tested it together. 😎 I'll let someone else give some 👀 for approval as well though.
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.
Neat solution!
Could you give this PR a title that obeys the conventional commits format |
…tation Co-authored-by: taty2010 <shydalys123@gmail.com>
Summary
When using the current plugin version with Gatsby V2, users were running into this error:
With the previous Dynamic import update, there were issues that could have emerged when placing the
deleteFunctions
within the conditional. This new change converts thegetApiHandler
function (where reach-router is being called) into a string and prevents reach-router from being required as a dependency for v2 sites.makeApiHandler
containsgetApiHandler
and is only called when creating a function.Test plan
Relevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal
Ref: #556
Standard checks:
🧪 Once merged, make sure to update the version if needed and that it was
published correctly.