From 53765b95058cf60e755b23c4f0010621b880d8cd Mon Sep 17 00:00:00 2001 From: Tiago Silva Date: Sun, 22 Dec 2024 00:43:08 +0000 Subject: [PATCH 1/2] build: remove assets from some build folders --- package.json | 5 +++-- vite.config.background.mts | 1 + vite.config.content.mts | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 656155b..6cde143 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "displayName": "Better GitHub Image Diff", "description": "The Better Github Image Diff Chromium/Firefox extension improves the image diff experience on GitHub `Files Changed` view.", "private": true, - "version": "1.3.1", + "version": "1.3.2", "type": "module", "packageManager": "pnpm@9.11.0", "scripts": { @@ -21,7 +21,8 @@ "start:chromium": "pnpm build:chromium && web-ext run --source-dir ./dist --browser-console --start-url https://github.com/bancorprotocol/carbon-app/pull/1464/files --target=chromium", "dev:firefox": "pnpm build:firefox && web-ext run --source-dir ./dist --browser-console --devtools --reload --start-url https://github.com/bancorprotocol/carbon-app/pull/1464/files --target=firefox-desktop", "dev:chromium": "pnpm build:chromium && web-ext run --source-dir ./dist --browser-console --devtools --reload --start-url https://github.com/bancorprotocol/carbon-app/pull/1464/files --target=chromium", - "pack:firefox": "web-ext build -s dist --overwrite-dest", + "pack:firefox": "pnpm build:firefox && web-ext build -s dist --overwrite-dest -n {name}_{version}_firefox.zip", + "pack:chromium": "pnpm build:chromium && web-ext build -s dist --overwrite-dest -n {name}_{version}_chromium.zip", "lint": "web-ext lint -s dist", "clear": "rimraf --glob dist/src dist/manifest.json dist.*", "e2e": "pnpm build:chromium && pnpm playwright test" diff --git a/vite.config.background.mts b/vite.config.background.mts index c5842dd..526e033 100644 --- a/vite.config.background.mts +++ b/vite.config.background.mts @@ -6,6 +6,7 @@ import packageJson from "./package.json"; // bundling the content script using Vite export default defineConfig({ ...sharedConfig, + publicDir: false, build: { watch: isDev ? {} : undefined, outDir: r("./dist/src/workers"), diff --git a/vite.config.content.mts b/vite.config.content.mts index e0a0270..12fda45 100644 --- a/vite.config.content.mts +++ b/vite.config.content.mts @@ -6,6 +6,7 @@ import packageJson from "./package.json"; // bundling the content script using Vite export default defineConfig({ ...sharedConfig, + publicDir: false, build: { watch: isDev ? {} : undefined, outDir: r("./dist/src/content-scripts"), From f3e8301540b7060ab669b8a74a2d461fc8f0674e Mon Sep 17 00:00:00 2001 From: Tiago Silva Date: Sun, 22 Dec 2024 00:43:29 +0000 Subject: [PATCH 2/2] style: clean-up comments in vite config --- vite.config.mts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vite.config.mts b/vite.config.mts index a55c2ea..ef9696f 100644 --- a/vite.config.mts +++ b/vite.config.mts @@ -46,10 +46,10 @@ export default defineConfig(({ command, mode }) => { rollupOptions: { input: { popup: r("src/popup/index.html"), - index: r("src/popup/index.ts"), // Add this line to include index.ts + index: r("src/popup/index.ts"), }, output: { - entryFileNames: "src/popup/index.js", // Ensure the output file is named correctly + entryFileNames: "src/popup/index.js", }, }, },