Skip to content

Commit

Permalink
chore: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hunghg255 committed Sep 2, 2023
1 parent 5c86d3c commit 9702c7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ interface Config {
name: string;
}

const result = loadConf<Config>('./app/app.config.js');
const result = loadConf<Config>(path.resolve(process.cwd(), 'app/app.config.js'));
// => { name: 'app' }
```

Expand Down
2 changes: 1 addition & 1 deletion src/loader/js.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import jitiFactory from 'jiti';
import type { JITIOptions } from 'jiti/dist/types';
import { Options } from 'sucrase';

function lazyJiti(rootDir:string = process.cwd(), option: JITIOptions = {}) {
function lazyJiti(rootDir: string = process.cwd(), option: JITIOptions = {}) {
const split = rootDir.split('/');
const _require = jitiFactory(rootDir, { interopDefault: true, esmResolve: true, ...option });
return _require(`./${split[split.length - 1]}`);
Expand Down

0 comments on commit 9702c7c

Please sign in to comment.