We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
resolve
1 parent 743630b commit c010393Copy full SHA for c010393
src/core/utils.ts
@@ -1,8 +1,8 @@
1
import { parse } from 'path'
2
import minimatch from 'minimatch'
3
+import resolve from 'resolve'
4
import { ResolvedConfig } from 'vite'
5
import { slash, toArray } from '@antfu/utils'
-import { sync as resolve } from 'resolve'
6
import { ComponentInfo, ResolvedOptions, ImportInfo } from '../types'
7
import { Context } from './context'
8
import { DISABLE_COMMENT } from './constants'
@@ -158,7 +158,7 @@ export function shouldTransform(code: string) {
158
}
159
160
export function resolveImportPath(importName: string): string | undefined {
161
- return resolve(importName, {
+ return resolve.sync(importName, {
162
preserveSymlinks: false,
163
})
164
0 commit comments