Skip to content

Commit

Permalink
chore: rename trySharp to tryUnsplitted
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed Mar 21, 2023
1 parent 4c111af commit f5c29fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/vite/src/node/plugins/resolve.ts
Expand Up @@ -476,12 +476,12 @@ function tryFsResolve(

// Dependencies like es5-ext use `#` in their paths. We don't support `#` in user
// source code so we only need to perform the check for dependencies.
const trySharp = fsPath.includes('#') && fsPath.includes('node_modules')
const tryUnsplitted = fsPath.includes('#') && fsPath.includes('node_modules')

let res: string | undefined

if (
trySharp &&
tryUnsplitted &&
(res = tryResolveFile(
fsPath,
'',
Expand Down Expand Up @@ -511,7 +511,7 @@ function tryFsResolve(

for (const ext of options.extensions) {
if (
trySharp &&
tryUnsplitted &&
(res = tryResolveFile(
fsPath + ext,
'',
Expand Down Expand Up @@ -546,7 +546,7 @@ function tryFsResolve(
if (!tryIndex) return

if (
trySharp &&
tryUnsplitted &&
(res = tryResolveFile(
fsPath,
'',
Expand Down

0 comments on commit f5c29fa

Please sign in to comment.