Skip to content

Commit

Permalink
fix: use default import for resolve, close #131
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Sep 5, 2021
1 parent 743630b commit c010393
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/utils.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { parse } from 'path'
import minimatch from 'minimatch'
import resolve from 'resolve'
import { ResolvedConfig } from 'vite'
import { slash, toArray } from '@antfu/utils'
import { sync as resolve } from 'resolve'
import { ComponentInfo, ResolvedOptions, ImportInfo } from '../types'
import { Context } from './context'
import { DISABLE_COMMENT } from './constants'
Expand Down Expand Up @@ -158,7 +158,7 @@ export function shouldTransform(code: string) {
}

export function resolveImportPath(importName: string): string | undefined {
return resolve(importName, {
return resolve.sync(importName, {
preserveSymlinks: false,
})
}

0 comments on commit c010393

Please sign in to comment.