fix(build): repair errors caused by manifest & structural changes

This commit is contained in:
David Ralph 2024-03-15 11:33:24 +00:00
parent 908ad1cc3b
commit e587b3d6ea
1 changed files with 16 additions and 2 deletions

View File

@ -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();