Skip to content

Commit

Permalink
Added a hackfix to work around Vite/rollup issue with react-no-ssr.
Browse files Browse the repository at this point in the history
  • Loading branch information
barankyle committed Apr 22, 2021
1 parent fd91dff commit 2e2e29f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion packages/client/src/pages/WorkerTest.tsx
Expand Up @@ -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();
Expand Down
4 changes: 3 additions & 1 deletion packages/client/src/pages/dev.tsx
Expand Up @@ -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();
Expand Down
4 changes: 3 additions & 1 deletion packages/client/src/pages/editor/projects/[projectId].tsx
Expand Up @@ -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.
Expand Down

0 comments on commit 2e2e29f

Please sign in to comment.