Skip to content

Commit

Permalink
feat: add cwd option to LoaderOptions (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
kricsleo authored Feb 26, 2025
1 parent 5bbaac0 commit 01b565a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/loader/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ export interface LoaderOptions {
jiti?: JitiOptions;
defaults?: Record<string, any>;
ignoreDefaults?: boolean;
cwd?: string;
}

export async function loadSchema(
entryPath: string,
options: LoaderOptions = {},
): Promise<Schema> {
const jiti = createJiti(
process.cwd(),
options.cwd || process.cwd(),
defu(options.jiti, {
interopDefault: true,
transformOptions: {
Expand Down

0 comments on commit 01b565a

Please sign in to comment.