fix(build): respect preserveSymlinks

pull/2780/head
Divyansh Singh 3 years ago
parent 0c8cf0df89
commit 15bd551694

@ -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

Loading…
Cancel
Save