Skip to content

Commit 1bda710

Browse files
authored
fix(build): respect preserveSymlinks (#2780)
1 parent 0c8cf0d commit 1bda710

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/node/build/render.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,9 @@ function resolvePageImports(
205205
// they start fetching as early as possible
206206
let srcPath = path.resolve(config.srcDir, page)
207207
try {
208-
srcPath = fs.realpathSync(srcPath)
208+
if (!config.vite?.resolve?.preserveSymlinks) {
209+
srcPath = fs.realpathSync(srcPath)
210+
}
209211
} catch (e) {
210212
// if the page is a virtual page generated by a dynamic route this would
211213
// fail, which is expected

0 commit comments

Comments
 (0)