Skip to content

Commit 984f22d

Browse files
use getCrossPlatformPathRegex
1 parent 05f7225 commit 984f22d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/cloudflare/src/cli/build/patches/plugins/fetch-cache-wait-until.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { getCrossPlatformPathRegex } from "@opennextjs/aws/utils/regex.js";
12
import { patchCode } from "../ast/util.js";
23
import type { ContentUpdater } from "./content-updater.js";
34

@@ -16,7 +17,10 @@ export function patchFetchCacheSetMissingWaitUntil(updater: ContentUpdater) {
1617
return updater.updateContent(
1718
"patch-fetch-cache-set-missing-wait-until",
1819
{
19-
filter: /(server\/chunks\/.*\.js|.*\.runtime\..*\.js|patch-fetch\.js)$/,
20+
filter: getCrossPlatformPathRegex(
21+
String.raw`(server/chunks/.*\.js|.*\.runtime\..*\.js|patch-fetch\.js)$`,
22+
{ escape: false }
23+
),
2024
contentFilter: /arrayBuffer\(\)\s*\.then/,
2125
},
2226
({ contents }) => {

0 commit comments

Comments
 (0)