From a377eae2f4b8799c710df4e6af910ba3228651ac Mon Sep 17 00:00:00 2001 From: Kendall Garner <17521368+kgarner7@users.noreply.github.com> Date: Fri, 20 Feb 2026 08:48:36 -0800 Subject: [PATCH] fix(build): do not add hash to favicon and assets --- src/main/index.ts | 2 +- src/renderer/themes/use-app-theme.ts | 2 +- web.vite.config.ts | 18 +++++++++--------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index b6a500e57..373fa7e02 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -870,7 +870,7 @@ if (!singleInstance) { app.whenReady() .then(() => { protocol.handle('feishin', async (request) => { - const filePath = `file://${request.url.slice('feishin://'.length)}`; + const filePath = `file:${request.url.slice('feishin:'.length)}`; const response = await net.fetch(filePath); const contentType = response.headers.get('content-type'); diff --git a/src/renderer/themes/use-app-theme.ts b/src/renderer/themes/use-app-theme.ts index 2cb073c29..b033c10d7 100644 --- a/src/renderer/themes/use-app-theme.ts +++ b/src/renderer/themes/use-app-theme.ts @@ -125,7 +125,7 @@ export const useAppTheme = (overrideTheme?: AppTheme) => { textStyleRef.current.textContent = ` @font-face { font-family: "dynamic-font"; - src: url("feishin://${custom}"); + src: url("feishin:${custom}"); }`; } else { const root = document.documentElement; diff --git a/web.vite.config.ts b/web.vite.config.ts index ea37bdd08..657ab128b 100644 --- a/web.vite.config.ts +++ b/web.vite.config.ts @@ -26,17 +26,17 @@ export default defineConfig({ output: { assetFileNames: (assetInfo) => { const stableNames = [ - '32x32', - '64x64', - '128x128', - '256x256', - '512x512', - '1024x1024', - 'favicon', - 'preview_full_screen_player', + '32x32.png', + '64x64.png', + '128x128.png', + '256x256.png', + '512x512.png', + '1024x1024.png', + 'favicon.ico', + 'preview_full_screen_player.webp', ]; - if (assetInfo.name && stableNames.includes(assetInfo.name)) { + if (assetInfo.names.length === 1 && stableNames.includes(assetInfo.names[0])) { return 'assets/[name][extname]'; }