diff --git a/packages/client/src/pages/WorkerTest.tsx b/packages/client/src/pages/WorkerTest.tsx index 1f4f724e20c3..e3a1dce82bfd 100755 --- a/packages/client/src/pages/WorkerTest.tsx +++ b/packages/client/src/pages/WorkerTest.tsx @@ -2,8 +2,10 @@ import { Plugins } from '@capacitor/core'; import Loading from '../components/Scene/loading'; import Layout from '../components/Layout/Layout'; import React, { useEffect, useState } from 'react'; -import NoSSR from 'react-no-ssr'; import { useTranslation } from 'react-i18next'; +// Hack to get around a bug in Vite/rollup: https://github.com/vitejs/vite/issues/2139 +import nossr from "react-no-ssr"; +const NoSSR = nossr.default ? nossr.default : nossr; export const IndexPage = (): any => { const { t } = useTranslation(); diff --git a/packages/client/src/pages/dev.tsx b/packages/client/src/pages/dev.tsx index bba03321ff89..a5b44b26342a 100755 --- a/packages/client/src/pages/dev.tsx +++ b/packages/client/src/pages/dev.tsx @@ -2,8 +2,10 @@ import DebugScene from '../components/Scene/debug'; import Loading from '../components/Scene/loading'; import Layout from '../components/Layout/Layout'; import React from 'react'; -import NoSSR from 'react-no-ssr'; import { useTranslation } from 'react-i18next'; +// Hack to get around a bug in Vite/rollup: https://github.com/vitejs/vite/issues/2139 +import nossr from "react-no-ssr"; +const NoSSR = nossr.default ? nossr.default : nossr; const LocationPage = () => { const { t } = useTranslation(); diff --git a/packages/client/src/pages/editor/projects/[projectId].tsx b/packages/client/src/pages/editor/projects/[projectId].tsx index acc1fd4f4278..c7035ea553c3 100755 --- a/packages/client/src/pages/editor/projects/[projectId].tsx +++ b/packages/client/src/pages/editor/projects/[projectId].tsx @@ -4,7 +4,9 @@ */ import React, { lazy, Suspense, useEffect, useState } from "react"; -import NoSSR from "react-no-ssr"; +// Hack to get around a bug in Vite/rollup: https://github.com/vitejs/vite/issues/2139 +import nossr from "react-no-ssr"; +const NoSSR = nossr.default ? nossr.default : nossr; // importing component EditorContainer.