diff --git a/src/node/build/render.ts b/src/node/build/render.ts index 9102fd095661..0ae8e686c8c1 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