diff --git a/package.json b/package.json index b4c3cbf..e827b2b 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,9 @@ "overrides": { "@webcomponents/custom-elements": "link:./empty", "rollup@2.78.1": "^2.79.2" + }, + "patchedDependencies": { + "@crxjs/vite-plugin": "patches/@crxjs__vite-plugin.patch" } } } diff --git a/patches/@crxjs__vite-plugin.patch b/patches/@crxjs__vite-plugin.patch new file mode 100644 index 0000000..0e0f558 --- /dev/null +++ b/patches/@crxjs__vite-plugin.patch @@ -0,0 +1,21 @@ +diff --git a/dist/index.mjs b/dist/index.mjs +index c543f3e83ffb5210495ac735f9a906e59b9da491..d40cc9536ff6491702a7ae40b85a024f88a1adef 100644 +--- a/dist/index.mjs ++++ b/dist/index.mjs +@@ -1838,8 +1838,6 @@ const pluginWebAccessibleResources = () => { + matches: [""], + // all resources are web accessible + resources: ["**/*", "*"], +- // change the extension origin on every reload +- use_dynamic_url: true + }; + if (browser === "firefox") { + delete war.use_dynamic_url; +@@ -1921,7 +1919,6 @@ const pluginWebAccessibleResources = () => { + const resource = { + matches: isDynamicScript ? [...dynamicScriptMatches] : matches, + resources: [...assets, ...imports], +- use_dynamic_url: isDynamicScript ? dynamicScriptDynamicUrl : true + }; + if (isDynamicScript || !injectCss) { + resource.resources.push(...css); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d458418..133893f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,11 @@ overrides: '@webcomponents/custom-elements': link:./empty rollup@2.78.1: ^2.79.2 +patchedDependencies: + '@crxjs/vite-plugin': + hash: 6y5bo5lqellg5dwpji7zksl3a4 + path: patches/@crxjs__vite-plugin.patch + importers: .: @@ -17,7 +22,7 @@ importers: version: 1.9.3 '@crxjs/vite-plugin': specifier: 2.0.0-beta.25 - version: 2.0.0-beta.25 + version: 2.0.0-beta.25(patch_hash=6y5bo5lqellg5dwpji7zksl3a4) '@hono/zod-openapi': specifier: ^0.16.4 version: 0.16.4(hono@4.6.5)(zod@3.23.8) @@ -2213,7 +2218,7 @@ snapshots: '@biomejs/cli-win32-x64@1.9.3': optional: true - '@crxjs/vite-plugin@2.0.0-beta.25': + '@crxjs/vite-plugin@2.0.0-beta.25(patch_hash=6y5bo5lqellg5dwpji7zksl3a4)': dependencies: '@rollup/pluginutils': 4.2.1 '@webcomponents/custom-elements': link:empty