From 1cf36e39cc150b139e7e90f73b6134fd04707c7e Mon Sep 17 00:00:00 2001 From: Anders Olsson Date: Thu, 4 Jun 2026 01:06:59 +0200 Subject: [PATCH] =?UTF-8?q?chore(web):=20finalize=20object=20authoring=20?= =?UTF-8?q?=E2=80=94=20i18n=20parity=20+=20verification?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lazy-load ObjectNewPage and ObjectEditForm routes to bring the initial JS bundle under the 150 KB gz budget (was 159 KB, now 140 KB). Co-Authored-By: Claude Sonnet 4.6 --- web/src/app.tsx | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/web/src/app.tsx b/web/src/app.tsx index 8196493..5508f09 100644 --- a/web/src/app.tsx +++ b/web/src/app.tsx @@ -1,14 +1,25 @@ +import { lazy, Suspense } from "react"; import { BrowserRouter, Navigate, Route, Routes } from "react-router-dom"; import { RequireAuth } from "./auth/require-auth"; import { LoginPage } from "./auth/login-page"; import { AppShell } from "./shell/app-shell"; import { ObjectsPage } from "./objects/objects-page"; -import { ObjectNewPage } from "./objects/object-new-page"; import { ObjectDetail } from "./objects/object-detail"; -import { ObjectEditForm } from "./objects/object-edit-form"; import { SelectPrompt } from "./objects/select-prompt"; +const ObjectNewPage = lazy(() => + import("./objects/object-new-page").then((m) => ({ default: m.ObjectNewPage })), +); + +const ObjectEditForm = lazy(() => + import("./objects/object-edit-form").then((m) => ({ default: m.ObjectEditForm })), +); + +function FormFallback() { + return
Loading…
; +} + export function App() { return ( @@ -16,11 +27,25 @@ export function App() { } /> }> }> - } /> + }> + + + } + /> }> } /> } /> - } /> + }> + + + } + /> } />