From e229c4e2f199274b2f45124d8b5ae0455c2c4ac6 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 7 Oct 2023 18:22:33 -0500 Subject: [PATCH] Make entrypoint extremely small! --- src/main.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.tsx b/src/main.tsx index 33b325dab..cd586aa25 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -22,10 +22,11 @@ import './styles/application.scss'; import './styles/tailwind.css'; import './precheck'; -import { default as Soapbox } from './containers/soapbox'; import ready from './ready'; import { registerSW } from './utils/sw'; +const Soapbox = React.lazy(() => import('./containers/soapbox')); + if (BuildConfig.NODE_ENV === 'production') { printConsoleWarning(); registerSW('/sw.js');