Skip to content

Commit

Permalink
feat: enable esmResolve when loading build.config
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Jul 19, 2022
1 parent 1888978 commit e8945c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.ts
Expand Up @@ -56,7 +56,7 @@ export function listRecursively (path: string) {
}

export function tryRequire (id: string, rootDir: string = process.cwd()) {
const _require = jiti(rootDir, { interopDefault: true })
const _require = jiti(rootDir, { interopDefault: true, esmResolve: true })
try {
return _require(id)
} catch (err: any) {
Expand Down

0 comments on commit e8945c9

Please sign in to comment.