Skip to content

Commit

Permalink
fix(build): respect preserveSymlinks (#2780)
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed Aug 12, 2023
1 parent 0c8cf0d commit 1bda710
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/node/build/render.ts
Expand Up @@ -205,7 +205,9 @@ function resolvePageImports(
// they start fetching as early as possible
let srcPath = path.resolve(config.srcDir, page)
try {
srcPath = fs.realpathSync(srcPath)
if (!config.vite?.resolve?.preserveSymlinks) {
srcPath = fs.realpathSync(srcPath)
}
} catch (e) {
// if the page is a virtual page generated by a dynamic route this would
// fail, which is expected
Expand Down

0 comments on commit 1bda710

Please sign in to comment.