fix: serve internal JS from path containing build ID (#2753)

Previously imported chunks were not cached at all. They are now cached
properly with immutable cache headers.
This commit is contained in:
Luca Casonato
2024-11-08 11:44:15 +01:00
committed by GitHub
parent 96e520a352
commit 6b685dde9f
6 changed files with 42 additions and 27 deletions
+1 -1
View File
@@ -764,7 +764,7 @@ Deno.test({
const link = res.headers.get("Link");
expect(link).toMatch(
/<\/fresh-runtime\.js\?__frsh_c=[^>]+>; rel="modulepreload"; as="script", <\/SelfCounter\.js\?__frsh_c=[^>]+>; rel="modulepreload"; as="script"/,
/<\/_fresh\/js\/[a-zA-Z0-9]+\/fresh-runtime\.js>; rel="modulepreload"; as="script", <\/_fresh\/js\/[a-zA-Z0-9]+\/SelfCounter\.js>; rel="modulepreload"; as="script"/,
);
},
sanitizeResources: false,