Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/warm-dragons-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@opennextjs/cloudflare": patch
---

improve windows support
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export function patchVercelOgLibrary(buildOpts: BuildOptions) {
const functionsPath = path.join(outputDir, "server-functions/default");
const packagePath = path.join(functionsPath, getPackagePath(buildOpts));

for (const traceInfoPath of globSync(path.join(appBuildOutputPath, ".next/server/**/*.nft.json"))) {
for (const traceInfoPath of globSync(path.join(appBuildOutputPath, ".next/server/**/*.nft.json"), {
windowsPathsNoEscape: true,
})) {
const traceInfo: TraceInfo = JSON.parse(readFileSync(traceInfoPath, { encoding: "utf8" }));
const tracedNodePath = traceInfo.files.find((p) => p.endsWith("@vercel/og/index.node.js"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ async function getRule(buildOpts: BuildOptions) {

const baseDir = join(outputDir, "server-functions/default", getPackagePath(buildOpts), ".next");
const appDir = join(baseDir, "server/app");
const manifests = await glob(join(baseDir, "**/*_client-reference-manifest.js"));
const manifests = await glob(join(baseDir, "**/*_client-reference-manifest.js"), {
windowsPathsNoEscape: true,
});

const returnManifests = manifests
.map((manifest) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async function getRule(buildOpts: BuildOptions) {
const baseDir = join(outputDir, "server-functions/default", getPackagePath(buildOpts));
const dotNextDir = join(baseDir, ".next");

const manifests = await glob(join(dotNextDir, "**/*-manifest.json"));
const manifests = await glob(join(dotNextDir, "**/*-manifest.json"), { windowsPathsNoEscape: true });

const returnManifests = (
await Promise.all(
Expand Down