diff --git a/src/appRouter.jsx b/src/appRouter.jsx
index 71785dc..aa5c0fe 100644
--- a/src/appRouter.jsx
+++ b/src/appRouter.jsx
@@ -1,3 +1,4 @@
+import { lazy } from 'react';
import { Navigate, createBrowserRouter } from 'react-router-dom';
import AppShell from './components/AppShell';
import SectionLayout from './components/SectionLayout';
@@ -24,11 +25,10 @@ import KundeListePage from './routes/kunde';
import KundeNeuPage from './routes/kunde/neu';
import KundeGruppenPage from './routes/kunde/gruppen';
import KundeEditPage from './routes/kunde/_entityId';
-import {
- ArticleHistoryPage,
- GlobalHistoryPage,
- StatisticsPage,
-} from './routes/infos';
+import StatisticsPage from './routes/infos/StatisticsPage';
+
+const ArticleHistoryPage = lazy(() => import('./routes/infos/ArticleHistoryPage'));
+const GlobalHistoryPage = lazy(() => import('./routes/infos/GlobalHistoryPage'));
const routes = [
{
diff --git a/src/automats/articleHistoryAutomat.js b/src/automats/articleHistoryAutomat.js
index 6f9fd1c..02c5c17 100644
--- a/src/automats/articleHistoryAutomat.js
+++ b/src/automats/articleHistoryAutomat.js
@@ -9,7 +9,7 @@
* - AG Grid: Triggers `fetchRows()` on viewport scroll, sort, or filter changes.
*/
-import { createGridAutomat } from 'react-virtual-aggridautomat';
+import { createGridAutomat } from 'react-virtual-aggridautomat/createGridAutomat';
import { article } from '../api';
import authAutomat from './authAutomat';
diff --git a/src/automats/globalHistoryAutomat.js b/src/automats/globalHistoryAutomat.js
index 486ad75..38f3981 100644
--- a/src/automats/globalHistoryAutomat.js
+++ b/src/automats/globalHistoryAutomat.js
@@ -9,7 +9,7 @@
* - AG Grid: Triggers `fetchRows()` on viewport scroll, sort, or filter changes.
*/
-import { createGridAutomat } from 'react-virtual-aggridautomat';
+import { createGridAutomat } from 'react-virtual-aggridautomat/createGridAutomat';
import { globalHistory } from '../api';
import authAutomat from './authAutomat';
diff --git a/src/components/SectionLayout.jsx b/src/components/SectionLayout.jsx
index 514587e..22bec28 100644
--- a/src/components/SectionLayout.jsx
+++ b/src/components/SectionLayout.jsx
@@ -1,6 +1,7 @@
-import { useState, useRef, useEffect } from 'react';
+import { useState, useRef, useEffect, Suspense } from 'react';
import { Outlet, useLocation } from 'react-router-dom';
import Box from '@mui/material/Box';
+import CircularProgress from '@mui/material/CircularProgress';
import Popover from '@mui/material/Popover';
import MenuList from '@mui/material/MenuList';
import MenuItem from '@mui/material/MenuItem';
@@ -198,7 +199,15 @@ export default function SectionLayout({ sectionPath }) {
showTitle={!isArticleDetail}
titleAction={titleAction}
>
-
+
+
+
+ }
+ >
+
+
);
}
diff --git a/vite.config.js b/vite.config.js
index 5cc1233..d27e03f 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -287,6 +287,15 @@ export default defineConfig(({ command }) => ({
},
},
},
+ chunkSizeWarningLimit: 1000,
+ modulePreload: {
+ resolveDependencies(filename, deps, { hostType }) {
+ if (hostType === 'html') {
+ return deps.filter((dep) => !dep.includes('ag-grid') && !dep.includes('AutomatGrid'));
+ }
+ return deps;
+ },
+ },
},
plugins: [
react(),