diff --git a/package.json b/package.json index a259c2af74..42c0a93edd 100644 --- a/package.json +++ b/package.json @@ -234,7 +234,7 @@ "@lobehub/chat-plugins-gateway": "^1.9.0", "@lobehub/desktop-ipc-typings": "workspace:*", "@lobehub/editor": "^3.16.1", - "@lobehub/icons": "^4.1.0", + "@lobehub/icons": "^4.9.0", "@lobehub/market-sdk": "^0.30.3", "@lobehub/tts": "^4.0.2", "@lobehub/ui": "^4.38.4", diff --git a/src/app/spa/[variants]/[[...path]]/route.ts b/src/app/spa/[variants]/[[...path]]/route.ts index a966f75017..88f71da517 100644 --- a/src/app/spa/[variants]/[[...path]]/route.ts +++ b/src/app/spa/[variants]/[[...path]]/route.ts @@ -19,8 +19,6 @@ import { } from '@/types/spaServerConfig'; import { RouteVariants } from '@/utils/server/routeVariants'; -import { desktopHtmlTemplate, mobileHtmlTemplate } from './spaHtmlTemplates'; - export const dynamic = 'force-static'; export function generateStaticParams() { @@ -97,6 +95,8 @@ async function getTemplate(isMobile: boolean): Promise { return await rewriteViteAssetUrls(html); } + const { desktopHtmlTemplate, mobileHtmlTemplate } = await import('./spaHtmlTemplates'); + return isMobile ? mobileHtmlTemplate : desktopHtmlTemplate; } diff --git a/vite.config.ts b/vite.config.ts index 073fe58b6a..ea8154784c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -97,6 +97,7 @@ export default defineConfig({ server: { cors: true, port: 9876, + host: true, proxy: { '/api': 'http://localhost:3010', '/oidc': 'http://localhost:3010',