Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx committed Jun 14, 2024
1 parent 4544b2f commit ee08fc1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/vite/src/esbuild-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ export function esBuildResolver(root = process.cwd()): EsBuildPlugin {
if (result.type === 'not_found') {
return null;
}
if (!result.result.path?.includes('node_modules') && result.result.path?.includes(resolverLoader.appRoot)) {
return {
external: true,
path: result.result.path,
};
}
return result.result;
}
delete (args as any).path;
Expand Down

0 comments on commit ee08fc1

Please sign in to comment.