u
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import { lazy } from 'react';
|
||||||
import { Navigate, createBrowserRouter } from 'react-router-dom';
|
import { Navigate, createBrowserRouter } from 'react-router-dom';
|
||||||
import AppShell from './components/AppShell';
|
import AppShell from './components/AppShell';
|
||||||
import SectionLayout from './components/SectionLayout';
|
import SectionLayout from './components/SectionLayout';
|
||||||
@@ -24,11 +25,10 @@ import KundeListePage from './routes/kunde';
|
|||||||
import KundeNeuPage from './routes/kunde/neu';
|
import KundeNeuPage from './routes/kunde/neu';
|
||||||
import KundeGruppenPage from './routes/kunde/gruppen';
|
import KundeGruppenPage from './routes/kunde/gruppen';
|
||||||
import KundeEditPage from './routes/kunde/_entityId';
|
import KundeEditPage from './routes/kunde/_entityId';
|
||||||
import {
|
import StatisticsPage from './routes/infos/StatisticsPage';
|
||||||
ArticleHistoryPage,
|
|
||||||
GlobalHistoryPage,
|
const ArticleHistoryPage = lazy(() => import('./routes/infos/ArticleHistoryPage'));
|
||||||
StatisticsPage,
|
const GlobalHistoryPage = lazy(() => import('./routes/infos/GlobalHistoryPage'));
|
||||||
} from './routes/infos';
|
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
* - AG Grid: Triggers `fetchRows()` on viewport scroll, sort, or filter changes.
|
* - 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 { article } from '../api';
|
||||||
import authAutomat from './authAutomat';
|
import authAutomat from './authAutomat';
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
* - AG Grid: Triggers `fetchRows()` on viewport scroll, sort, or filter changes.
|
* - 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 { globalHistory } from '../api';
|
||||||
import authAutomat from './authAutomat';
|
import authAutomat from './authAutomat';
|
||||||
|
|
||||||
|
|||||||
@@ -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 { Outlet, useLocation } from 'react-router-dom';
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
|
import CircularProgress from '@mui/material/CircularProgress';
|
||||||
import Popover from '@mui/material/Popover';
|
import Popover from '@mui/material/Popover';
|
||||||
import MenuList from '@mui/material/MenuList';
|
import MenuList from '@mui/material/MenuList';
|
||||||
import MenuItem from '@mui/material/MenuItem';
|
import MenuItem from '@mui/material/MenuItem';
|
||||||
@@ -198,7 +199,15 @@ export default function SectionLayout({ sectionPath }) {
|
|||||||
showTitle={!isArticleDetail}
|
showTitle={!isArticleDetail}
|
||||||
titleAction={titleAction}
|
titleAction={titleAction}
|
||||||
>
|
>
|
||||||
<Outlet />
|
<Suspense
|
||||||
|
fallback={
|
||||||
|
<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'center', py: 8 }}>
|
||||||
|
<CircularProgress />
|
||||||
|
</Box>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Outlet />
|
||||||
|
</Suspense>
|
||||||
</PageLayout>
|
</PageLayout>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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: [
|
plugins: [
|
||||||
react(),
|
react(),
|
||||||
|
|||||||
Reference in New Issue
Block a user