Skip to content

Commit

Permalink
chore: rename
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Aug 2, 2021
1 parent d7df9b8 commit 56a82a4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/vite/src/node/plugins/resolve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export interface InternalResolveOptions extends ResolveOptions {
asSrc?: boolean
tryIndex?: boolean
tryPrefix?: string
skipPackage?: boolean
skipPackageJson?: boolean
preferRelative?: boolean
isRequire?: boolean
}
Expand Down Expand Up @@ -288,7 +288,7 @@ function tryFsResolve(
false,
targetWeb,
options.tryPrefix,
options.skipPackage
options.skipPackageJson
))
) {
return res
Expand All @@ -303,7 +303,7 @@ function tryFsResolve(
false,
targetWeb,
options.tryPrefix,
options.skipPackage
options.skipPackageJson
))
) {
return res
Expand All @@ -318,7 +318,7 @@ function tryFsResolve(
tryIndex,
targetWeb,
options.tryPrefix,
options.skipPackage
options.skipPackageJson
))
) {
return res
Expand All @@ -332,7 +332,7 @@ function tryResolveFile(
tryIndex: boolean,
targetWeb: boolean,
tryPrefix?: string,
skipPkg?: boolean
skipPackageJson?: boolean
): string | undefined {
let isReadable = false
try {
Expand All @@ -346,7 +346,7 @@ function tryResolveFile(
if (!fs.statSync(file).isDirectory()) {
return normalizePath(ensureVolumeInPath(file)) + postfix
} else if (tryIndex) {
if (!skipPkg) {
if (!skipPackageJson) {
const pkgPath = file + '/package.json'
if (fs.existsSync(pkgPath)) {
// path points to a node package
Expand Down Expand Up @@ -617,8 +617,8 @@ export function resolvePackageEntry(
options.mainFields?.[0] === 'sass' &&
!options.extensions?.includes(path.extname(entryPoint))
) {
entryPoint = '';
options.skipPackage = true;
entryPoint = ''
options.skipPackageJson = true
}

// resolve object browser field in package.json
Expand Down

0 comments on commit 56a82a4

Please sign in to comment.