Skip to content

Commit

Permalink
docs: update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Mar 16, 2023
1 parent 084b664 commit a8c3869
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 0 additions & 2 deletions packages/vite/src/node/ssr/ssrExternal.ts
Expand Up @@ -278,7 +278,6 @@ function cjsSsrCollectExternals(
// trace the dependencies of linked packages
else if (!esmEntry.includes('node_modules')) {
const pkgPath = resolvePkgJsonPath(id, root)
// NOTE (temp): if pkg not found, we skip instead of error, is this problematic?
if (pkgPath) {
depsToTrace.add(path.dirname(pkgPath))
}
Expand All @@ -292,7 +291,6 @@ function cjsSsrCollectExternals(
// for now, we'll just leave this as is
else if (/\.m?js$/.test(esmEntry)) {
const pkgPath = resolvePkgJsonPath(id, root)
// NOTE (temp): if pkg not found, we skip instead of error, is this problematic?
if (!pkgPath) {
continue
}
Expand Down
4 changes: 3 additions & 1 deletion packages/vite/src/node/utils.ts
Expand Up @@ -592,7 +592,9 @@ export const removeDir = isWindows
}
export const renameDir = isWindows ? promisify(gracefulRename) : fs.renameSync

// `fs.realpathSync.native` has a bug in Windows network drive that prepends a slash
// `fs.realpathSync.native` resolves differently in Windows network drive,
// causing file read errors. skip for now.
// https://github.com/nodejs/node/issues/37737
export const safeRealpathSync = isWindows
? fs.realpathSync
: fs.realpathSync.native
Expand Down

0 comments on commit a8c3869

Please sign in to comment.