mirror of
https://github.com/lobehub/lobe-chat.git
synced 2026-06-13 19:20:04 +00:00
🐛 fix: strip manifest link in Vite dev to silence 404 warning (#14079)
Dev server does not serve /manifest.webmanifest, which causes a console 404 in the browser. Add a shared dev-only Vite plugin that removes the <link rel="manifest"> tag via transformIndexHtml for web/mobile/desktop.
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user