From e587b3d6eae24c6c6cfbd90d48456c61adbe2abe Mon Sep 17 00:00:00 2001 From: David Ralph Date: Fri, 15 Mar 2024 11:33:24 +0000 Subject: [PATCH] fix(build): repair errors caused by manifest & structural changes --- vite.config.mjs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/vite.config.mjs b/vite.config.mjs index 7bfa75fd..385c7844 100644 --- a/vite.config.mjs +++ b/vite.config.mjs @@ -23,7 +23,7 @@ const prepareBuilds = () => ({ path.resolve(__dirname, './build/chrome/manifest.json'), ); fs.copyFileSync( - path.resolve(__dirname, './manifest/background-chrome.js'), + path.resolve(__dirname, './manifest/background.js'), path.resolve(__dirname, './build/chrome/background.js'), ); fs.cpSync( @@ -36,6 +36,13 @@ const prepareBuilds = () => ({ fs.cpSync(path.resolve(__dirname, './dist'), path.resolve(__dirname, './build/chrome/'), { recursive: true, }); + fs.cpSync( + path.resolve(__dirname, './src/assets/icons'), + path.resolve(__dirname, './build/chrome/icons'), + { + recursive: true, + }, + ); // firefox fs.mkdirSync(path.resolve(__dirname, './build/firefox'), { recursive: true }); @@ -44,12 +51,19 @@ const prepareBuilds = () => ({ path.resolve(__dirname, './build/firefox/manifest.json'), ); fs.copyFileSync( - path.resolve(__dirname, './manifest/background-firefox.js'), + path.resolve(__dirname, './manifest/background.js'), path.resolve(__dirname, './build/firefox/background.js'), ); fs.cpSync(path.resolve(__dirname, './dist'), path.resolve(__dirname, './build/firefox/'), { recursive: true, }); + fs.cpSync( + path.resolve(__dirname, './src/assets/icons'), + path.resolve(__dirname, './build/firefox/icons'), + { + recursive: true, + }, + ); // create zip const zip = new ADMZip();