-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[1.0] Fix for gatsby develop hiccuping on gatsby-ssr.js using import
#1125
Conversation
import { Provider } from 'react-redux' | ||
|
||
import createStore from './src/state/createStore' | ||
|
||
exports.replaceServerBodyRender = ({ component: body }) => { | ||
exports.replaceRenderer = ({ bodyComponent, replaceBodyHTMLString }) => { |
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.
Applying latest APIs from here: https://www.gatsbyjs.org/docs/ssr-apis/#replaceRenderer
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.
Cool!
Deploy preview ready! Built with commit f75845f |
Deploy preview ready! Built with commit f75845f |
Deploy preview ready! Built with commit f75845f |
Yeah... this means any plugin which implements gatsby-ssr.js won't work as expected in development since they can't set their header/postbody components. |
Ah makes sense. OK feel free to close. Not familiar enough with webpack to know where to start with your suggestion. :/ |
The redux example changes would still be great to get in! |
OK I'll close this and open an new one with the redux example changes. |
@mericsson Correct me if I'm wrong, but this was closed even though the original issue wasn't fixed - am I reading this right? If so, can we re-open? I'd love to get this fixed / fix it if need be. 😎 |
@scottyeck yep you're right. This was closed though original issue was not fixed. I'll re-open it. If you want to give a try to fix it that would be awesome! |
haha no it should actually be closed and an issue be created for this. The normal pattern is:
if PR doesn't work, repeat with more PRs until one is merged and then close issue 1. The problem here is there wasn't an issue ever created so closing this PR left us without something tracking the issue. Could one of you create an issue for this and we move on from there? |
I'll create an issue. thanks @KyleAMathews |
Opened Issue 1156 to track this. |
Ah great - totally didn't realize this was a PR and not an issue. My bad. Thanks all 😎 |
@KyleAMathews this doesn't feel right given what you wrote in PR 1081 but I wasn't sure how to apply your comment. This workaround seems to work, but I'm not sure if it has downstream effects. Still acquainting myself with the code but thought I'd put this for review to get more ideas / feedback and collaborate on this issue.
The issue, to restate it, is when using ES6 features that require webpack like
import
ingatsby-ssr.js
then runninggatsby develop
dies a quick death.Appreciate any help to dig into this. Thanks!