Skip to content

Commit

Permalink
chore: simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed May 5, 2022
1 parent 033cf92 commit 4ae67ef
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/vite/src/node/ssr/ssrExternal.ts
Expand Up @@ -130,12 +130,8 @@ function collectExternals(
debug(`Failed to resolve entries for package "${id}"\n`, e)
continue
}
// no esm entry but has require entry
if (!esmEntry) {
ssrExternals.add(id)
}
// trace the dependencies of linked packages
else if (!esmEntry.includes('node_modules')) {
if (esmEntry && !esmEntry.includes('node_modules')) {
const pkgPath = resolveFrom(`${id}/package.json`, root)
depsToTrace.add(path.dirname(pkgPath))
} else {
Expand Down

0 comments on commit 4ae67ef

Please sign in to comment.