fix(build): respect preserveSymlinks (#2780)

pull/2782/head
Divyansh Singh 1 year ago committed by GitHub
parent 0c8cf0df89
commit 1bda710702
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -205,7 +205,9 @@ function resolvePageImports(
// they start fetching as early as possible
let srcPath = path.resolve(config.srcDir, page)
try {
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

Loading…
Cancel
Save