Skip to content

Commit 0c26049

Browse files
authoredFeb 12, 2025··
fix:path to file template in open-next.config.ts (#359)
1 parent 762d487 commit 0c26049

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed
 

‎.changeset/selfish-bananas-nail.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@opennextjs/cloudflare": patch
3+
---
4+
5+
fix path to file template in `open-next.config.ts`.

‎packages/cloudflare/src/utils/get-package-templates-dir-path.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
import * as path from "node:path";
1+
import path from "node:path";
2+
import url from "node:url";
23

3-
const templatesDirPath = path.resolve(`${import.meta.dirname}/../../templates`);
4+
const __filename = url.fileURLToPath(import.meta.url);
5+
const __dirname = path.dirname(__filename);
6+
const templatesDirPath = path.join(__dirname, "/../../templates");
47

58
/**
69
* Utility for getting the resolved path to the package's templates directory

0 commit comments

Comments
 (0)
Please sign in to comment.