Skip to content

Commit

Permalink
fix: handle one more place
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Mar 23, 2023
1 parent c046c65 commit 1cc2101
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vite/src/node/plugins/resolve.ts
Expand Up @@ -842,8 +842,8 @@ export function tryNodeResolve(
!(
ext === '.cjs' ||
(ext === '.js' &&
findNearestPackageData(resolved, options.packageCache)?.data.type !==
'module')
findNearestPackageData(path.dirname(resolved), options.packageCache)
?.data.type !== 'module')
) &&
!(include?.includes(pkgId) || include?.includes(id)))

Expand Down

0 comments on commit 1cc2101

Please sign in to comment.