Skip to content

Commit 12d8b7e

Browse files
committed
.
1 parent 7b2ff7a commit 12d8b7e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/cloudflare/src/cli/commands/populate-cache.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,15 @@ export function getCacheAssets(opts: BuildOptions): CacheAsset[] {
5959

6060
for (const file of allFiles) {
6161
const fullPath = file.fullpathPosix();
62-
const relativePath = normalizePath(path.relative(path.join(opts.outputDir, "cache"), fullPath));
62+
console.warn("fullPath", fullPath);
63+
console.warn("path.join", path.join(opts.outputDir, "cache"));
64+
const relativePath = normalizePath(
65+
fullPath
66+
.replace(/^\\\\\?\\/, "")
67+
.replace(path.join(opts.outputDir, "cache"), "")
68+
.replace(/^\//, "")
69+
);
70+
console.warn("relativePath", relativePath);
6371

6472
if (relativePath.startsWith("__fetch")) {
6573
const [__fetch, buildId, ...keyParts] = relativePath.split("/");

0 commit comments

Comments
 (0)