You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0e38a37
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(@angular/build): remove unnecessary realpath resolution for workspace root
Previously, `canonicalizePath` resolved `context.workspaceRoot` using `realpathSync` unless `preserveSymlinks` was enabled. Resolving the workspace root was originally intended to align workspace paths with Node/TypeScript default physical file resolution, but created an unnecessary path asymmetry between `preserveSymlinks` settings and mutated the logical workspace path.
Furthermore, passing the resolved real path as `absWorkingDir` to esbuild caused esbuild to format metafile paths relative to the real path rather than the logical workspace root. This required workarounds to remap metafile paths back to the workspace root.
This change is safe today because Angular compiler plugins and path resolution utilities normalize relative paths dynamically without requiring `workspaceRoot` to be realpath'd. Removing `realpathSync` from `canonicalizePath` ensures `workspaceRoot` consistently remains the logical workspace path across all builders, esbuild natively formats metafile paths relative to `workspaceRoot`, and `remapMetafileBasePath` is no longer needed.
(cherry picked from commit 6c6bb21)
0 commit comments