diff --git a/@kindspells/astro-shield/package.json b/@kindspells/astro-shield/package.json index 3ccd41b..abfff76 100644 --- a/@kindspells/astro-shield/package.json +++ b/@kindspells/astro-shield/package.json @@ -1,6 +1,6 @@ { "name": "@kindspells/astro-shield", - "version": "1.3.2", + "version": "1.3.3", "description": "Astro integration to enhance your website's security with SubResource Integrity hashes, Content-Security-Policy headers, and other techniques.", "private": false, "type": "module", diff --git a/@kindspells/astro-shield/src/core.mjs b/@kindspells/astro-shield/src/core.mjs index 7490c9e..f8027d4 100644 --- a/@kindspells/astro-shield/src/core.mjs +++ b/@kindspells/astro-shield/src/core.mjs @@ -842,7 +842,7 @@ const loadVirtualMiddlewareModule = async ( if (!shouldRegenerateHashesModule) { try { const hashesModule = /** @type {HashesModule} */ ( - await import(sri.hashesModule) + await import(/* @vite-ignore */ sri.hashesModule) ) for (const allowedScript of sri.scriptsAllowListUrls) { diff --git a/@kindspells/astro-shield/tests/core.test.mts b/@kindspells/astro-shield/tests/core.test.mts index 28e0e09..4ed2ccd 100644 --- a/@kindspells/astro-shield/tests/core.test.mts +++ b/@kindspells/astro-shield/tests/core.test.mts @@ -365,7 +365,7 @@ describe('updateStaticPageSriHashes', () => { My Test Page - + ` @@ -382,7 +382,7 @@ describe('updateStaticPageSriHashes', () => { expect(h.extScriptHashes.size).toBe(1) expect( h.extScriptHashes.has( - 'sha256-XJRisMK9wQvjjOmHgwTyaPbBdQ7sIaEh6BiqErhW4f8=', + 'sha256-26MA71l0ZDlgA73URL13JbJ0hGMnRJgoHHJmSPLSspk=', ), ).toBe(true) expect(h.inlineScriptHashes.size).toBe(0)