Skip to content

Commit 0a836f7

Browse files
authoredDec 17, 2024··
Work around issue with Node 22 and Jiti (#15421)
Fixes #15374 If we always use Jiti the problem should, in theory, go away (I hope). It does mean that loading configs is slower than it would be if they're written in CJS but 🤷‍♂️ Wanna get this running with the integration tests to see if anything breaks.
1 parent f875ab9 commit 0a836f7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎src/lib/load-config.ts

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ function lazyJiti() {
3333

3434
export function loadConfig(path: string): Config {
3535
let config = (function () {
36+
// Always use jiti for now. There is a a bug that occurs in Node v22.12+
37+
// where imported files return invalid results
38+
return lazyJiti()(path)
39+
3640
// Always use jiti for ESM or TS files
3741
if (
3842
path &&

0 commit comments

Comments
 (0)
Please sign in to comment.