From 9e97c6c7abf8ee5b093e3e688b8901901c463951 Mon Sep 17 00:00:00 2001 From: multipleof4 Date: Tue, 10 Mar 2026 22:49:14 -0700 Subject: [PATCH] Fix: explicitly copy icon_500.png to dist target --- vite.config.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vite.config.js b/vite.config.js index 55606e6..fea6654 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,4 +1,5 @@ import { defineConfig } from 'vite'; +import fs from 'node:fs'; const target = process.env.TARGET || 'firefox'; @@ -52,6 +53,16 @@ export default defineConfig(async () => { ); } + // Custom plugin to ensure the icon is always copied to the target output directory + plugins.push({ + name: 'copy-icon', + writeBundle() { + if (fs.existsSync('icon_500.png')) { + fs.copyFileSync('icon_500.png', `dist/${target}/icon_500.png`); + } + } + }); + return { build: { outDir: `dist/${target}`,