Skip to content

Commit

Permalink
fix(gatsby): pull out a few bug fixes from #28149
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleAMathews committed Nov 19, 2020
1 parent 413888b commit a1d4468
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/gatsby/src/services/initialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ This will help the dev environment more closely mimic builds so you'll catch bui
Try out develop SSR *today* by running your site with it enabled:
GATSBY_EXPERIMENT_DEV_SSR=true gatsby develop
GATSBY_EXPERIMENTAL_DEV_SSR=true gatsby develop
Please let us know how it goes good, bad, or otherwise at gatsby.dev/dev-ssr-feedback
`,
Expand Down
4 changes: 4 additions & 0 deletions packages/gatsby/src/utils/dev-ssr/render-dev-html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import _ from "lodash"

import { startListener } from "../../bootstrap/requires-writer"
import { findPageByPath } from "../find-page-by-path"
import { getPageData as getPageDataExperimental } from "../get-page-data"

const startWorker = (): any => {
const newWorker = new JestWorker(require.resolve(`./render-dev-html-child`), {
Expand Down Expand Up @@ -63,6 +64,9 @@ export const renderDevHTML = ({
isClientOnlyPage = true
}

// Ensure the query has been run and written out.
await getPageDataExperimental(pageObj.path)

try {
const htmlString = await worker.renderHTML({
path,
Expand Down

0 comments on commit a1d4468

Please sign in to comment.