Skip to content

feat(bundler): preserveSymlinks for monorepo workspaces with symlinked packages #156

Description

@lukekania

Goal

Honor preserveSymlinks: true so monorepo workspaces with symlinked package folders (pnpm, yarn workspaces with link protocol) resolve through the symlink rather than the canonical path.

Current state

Silently overridden — every path is canonicalized via dashmap-cached canonicalize(). This is a perf optimization but breaks scenarios where two distinct logical packages point at the same physical directory.

Scope

  • crates/bundler/src/concat.rs: thread a preserve_symlinks: bool flag through BundleInput.
  • Replace cached_canonicalize calls with a function that returns the input path unchanged when the flag is set.
  • The npm-resolver also canonicalizes — same treatment there.

Definition of done

  • A pnpm-style monorepo where two packages depend on different symlinked versions of a shared utility resolves both correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestparity:nice-to-haveDefer to post-1.0 unless someone explicitly needs it.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions