diff --git a/src/init/soapbox.tsx b/src/init/soapbox.tsx index b63e42f3b..e8b657d28 100644 --- a/src/init/soapbox.tsx +++ b/src/init/soapbox.tsx @@ -10,9 +10,9 @@ import { checkOnboardingStatus } from '../actions/onboarding'; import { preload } from '../actions/preload'; import { store } from '../store'; -const SoapboxHead = React.lazy(() => import('./soapbox-head')); -const SoapboxLoad = React.lazy(() => import('./soapbox-load')); -const SoapboxMount = React.lazy(() => import('./soapbox-mount')); +import SoapboxHead from './soapbox-head'; +import SoapboxLoad from './soapbox-load'; +import SoapboxMount from './soapbox-mount'; // Configure global functions for developers createGlobals(store); diff --git a/src/main.tsx b/src/main.tsx index 680867c75..1ef21a493 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -4,6 +4,7 @@ import React from 'react'; import { createRoot } from 'react-dom/client'; import * as BuildConfig from 'soapbox/build-config'; +import Soapbox from 'soapbox/init/soapbox'; import { printConsoleWarning } from 'soapbox/utils/console'; import '@fontsource/inter/200.css'; @@ -26,8 +27,6 @@ import './precheck'; import ready from './ready'; import { registerSW } from './utils/sw'; -const Soapbox = React.lazy(() => import('./init/soapbox')); - if (BuildConfig.NODE_ENV === 'production') { printConsoleWarning(); registerSW('/sw.js');