Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.

Commit

Permalink
fix(react): hydration undefined when serverOnly
Browse files Browse the repository at this point in the history
  • Loading branch information
galvez committed Aug 4, 2022
1 parent 923e29a commit 527ec85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion devinstall.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

const { name: example } = path.parse(process.cwd())
const exRoot = path.resolve(__dirname, 'starters', example)
const command = process.argv.slice(5)
const command = process.argv.slice(process.argv.findIndex(_ => _ === '--') + 1)

if (!fs.existsSync(exRoot)) {
console.log('Must be called from a directory under starters/.')
Expand Down
1 change: 1 addition & 0 deletions packages/fastify-dx-react/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export function createHtmlFunction (source, scope, config) {
head: headTemplate({ ...context, head }),
footer: () => footerTemplate({
...context,
hydration: '',
// Decide whether or not to include the hydration script
...!context.serverOnly && {
hydration: (
Expand Down

0 comments on commit 527ec85

Please sign in to comment.