Skip to content

Commit

Permalink
fix ssr plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
csr632 committed Dec 17, 2022
1 parent 32bea78 commit e5239b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react-pages/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ export const IS_SSR = process.env.VITE_PAGES_IS_SSR === 'true'
* so that your ssr code will not increase client bundle size.
*/
export function registerSSRPlugin(importSSRPlugin: () => Promise<SSRPlugin>) {
const impl = (global as any)['register_vite_pages_ssr_plugin']
return impl(importSSRPlugin)
const impl = (globalThis as any)['register_vite_pages_ssr_plugin']
return impl?.(importSSRPlugin)
}

0 comments on commit e5239b6

Please sign in to comment.