From 879c6f7993d399b9b24719716b2067f318bd2efe Mon Sep 17 00:00:00 2001 From: Elliott Johnson Date: Fri, 9 Oct 2026 10:44:43 -0600 Subject: [PATCH] fix: use explicit `.js` extension in type imports for `nodenext` compatibility --- .changeset/nodenext-imports.md | 5 +++++ src/uneval.js | 2 +- tsconfig.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/nodenext-imports.md diff --git a/.changeset/nodenext-imports.md b/.changeset/nodenext-imports.md new file mode 100644 index 0000000..d8e1d73 --- /dev/null +++ b/.changeset/nodenext-imports.md @@ -0,0 +1,5 @@ +--- +'devalue': patch +--- + +fix: use explicit `.js` extension in type imports for `nodenext` compatibility diff --git a/src/uneval.js b/src/uneval.js index 8396dec..912f5d5 100644 --- a/src/uneval.js +++ b/src/uneval.js @@ -1,5 +1,5 @@ /** - * @import { UnevalReplacer } from './types'; + * @import { UnevalReplacer } from './types.js'; */ import { js, JavaScriptSource } from './javascript-source.js'; import { diff --git a/tsconfig.json b/tsconfig.json index 5a7fe75..a7d157a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,7 +10,7 @@ "noEmitOnError": true, "noUnusedLocals": true, "lib": ["es6", "esnext", "dom"], - "module": "esnext", + "module": "nodenext", "target": "esnext", "types": ["node"], "rootDir": "./src"