subpath feature

This commit is contained in:
Lucas Winther committed 2026-07-10 10:13:37 +02:00
1 parent 2d668b3fb8
commit 076efc2101
11 files changed
+32 -31

No files matched your search

+5 -5
View File
@@ -11,15 +11,15 @@ describe("precachePathsFromOutputs", () => {
expect(
precachePathsFromOutputs(
["index.html", "chunk-abc123.js", "chunk-abc123.js.map", "./index-def456.css"],
["/inference.worker.js"],
["inference.worker.js"],
),
).toEqual(["/", "/chunk-abc123.js", "/index-def456.css", "/inference.worker.js"]);
).toEqual(["./", "chunk-abc123.js", "index-def456.css", "inference.worker.js"]);
});
test("deduplicates and sorts", () => {
expect(precachePathsFromOutputs(["a.js", "a.js"], ["/a.js", "/"])).toEqual([
"/",
"/a.js",
expect(precachePathsFromOutputs(["a.js", "a.js"], ["a.js", "./"])).toEqual([
"./",
"a.js",
]);
});
});