Skip to content

Commit

Permalink
fix: update to jiti 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Oct 5, 2024
1 parent 5b62926 commit 1420b72
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 43 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"defu": "^6.1.4",
"dotenv": "^16.4.5",
"giget": "^1.2.3",
"jiti": "^2.0.0",
"jiti": "^2.3.0",
"mlly": "^1.7.1",
"ohash": "^1.1.4",
"pathe": "^1.1.2",
Expand Down
82 changes: 41 additions & 41 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,9 @@ async function resolveConfig<
const contents = await readFile(res.configFile!, "utf8");
res.config = asyncLoader(contents);
} else {
res.config = (await options.jiti!.import(res.configFile!)) as T;
res.config = (await options.jiti!.import(res.configFile!, {
default: true,
})) as T;
}
if (res.config instanceof Function) {
res.config = await res.config();
Expand Down

0 comments on commit 1420b72

Please sign in to comment.