Skip to content

Commit

Permalink
fix(resolve): get pkg from importer for relative id (#1599)
Browse files Browse the repository at this point in the history
  • Loading branch information
meowtec committed Jan 20, 2021
1 parent 3a3029e commit c821f09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/resolve.ts
Expand Up @@ -118,7 +118,7 @@ export function resolvePlugin(

if ((res = tryFsResolve(fsPath, isProduction))) {
isDebug && debug(`[relative] ${chalk.cyan(id)} -> ${chalk.dim(res)}`)
const pkg = idToPkgMap.get(id)
const pkg = importer != null && idToPkgMap.get(importer)
if (pkg) {
idToPkgMap.set(res, pkg)
return {
Expand Down

0 comments on commit c821f09

Please sign in to comment.