Skip to content

Commit

Permalink
fix(cli): use import.meta.url io __dirname
Browse files Browse the repository at this point in the history
  • Loading branch information
almahdi404 committed Sep 6, 2024
1 parent 537c7df commit b61744a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/shaggy-ghosts-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"treeground": patch
---

fix(cli): use import.meta.url io \_\_dirname
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ import path from "node:path";
process.env.PORT = 7533;
process.env.HOST = "localhost";

import(path.join(process.cwd(), ".output", "server", "index.mjs"));
import(
path.join(path.dirname(import.meta.url), ".output", "server", "index.mjs")
);

0 comments on commit b61744a

Please sign in to comment.