Skip to content

Commit

Permalink
fix: loader works on node 18.20
Browse files Browse the repository at this point in the history
Signed-off-by: Ashley Claymore <[email protected]>
  • Loading branch information
acutmore committed Sep 19, 2024
1 parent f26307d commit 0920b23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ console.log(blankSourceFile(ast));
# Install (one time):
$ npm install --save-dev ts-blank-space

# Example usage (Node.js v18.18):
# Example usage (Node.js >= v18.20):
$ node --import ts-blank-space/register ./path/to/your/file.ts
```

Expand Down
3 changes: 1 addition & 2 deletions loader/register.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { register } from "node:module";
import { pathToFileURL } from "node:url";

register("./hooks.js", pathToFileURL(import.meta.filename));
register("./hooks.js", import.meta.url);

0 comments on commit 0920b23

Please sign in to comment.