Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix: strip manifest link in Vite dev to silence 404 warning (#14079)

Innei4e31a3359984
diff --git a/plugins/vite/sharedRendererConfig.ts b/plugins/vite/sharedRendererConfig.ts
index a263f6d4298..a9aff257cd8 100644
--- a/plugins/vite/sharedRendererConfig.ts
+++ b/plugins/vite/sharedRendererConfig.ts
@@ -143,6 +143,14 @@ export function sharedRendererPlugins(options: SharedRendererOptions) {
viteNodeModuleStub(),
vitePlatformResolve(options.platform),
+ isDev && {
+ name: 'lobe-dev-strip-manifest',
+ transformIndexHtml: {
+ order: 'pre' as const,
+ handler: (html: string) => html.replace(/\s*<link\s+rel="manifest"[^>]*>\s*/i, '\n '),
+ },
+ },
+
isDev &&
codeInspectorPlugin({
bundler: 'vite',