From 51906043d318b2485ea8fc3aff4b4644c95dd3f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Romanowicz?= <46789227+lukeromanowicz@users.noreply.github.com> Date: Fri, 22 Jan 2021 16:12:07 +0100 Subject: [PATCH] fix: support symbolic links in building docs dist (#184) (#185) fix #184 --- src/node/build/render.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/node/build/render.ts b/src/node/build/render.ts index 9102fd09..0ae8e686 100644 --- a/src/node/build/render.ts +++ b/src/node/build/render.ts @@ -88,7 +88,9 @@ function resolvePageImports( ) { // find the page's js chunk and inject script tags for its imports so that // they are start fetching as early as possible - const srcPath = normalizePath(path.resolve(config.root, page)) + const srcPath = normalizePath( + fs.realpathSync(path.resolve(config.root, page)) + ) const pageChunk = result.output.find( (chunk) => chunk.type === 'chunk' && chunk.facadeModuleId === srcPath ) as OutputChunk