Skip to content

Patched Dependencies ​

If your workspace uses PNPM's patched dependencies or Bun's patch support, isolate will automatically copy the relevant patch files to the isolated output.

How It Works ​

Patches are filtered based on the target package's dependencies:

  • Patches for production dependencies are always included
  • Patches for dev dependencies are only included when includeDevDependencies is enabled
  • Patches for packages not in the target's dependency tree are excluded

The patch files are copied to the isolated output, preserving their original directory structure. pnpm 9 and 10 store the path in package.json's pnpm.patchedDependencies; when the source workspace configuration declares the paths, its copied or filtered pnpm-workspace.yaml does too. Their lockfile entries include both the path and hash. pnpm 11 and later store the hash in the lockfile and the copied patch path in pnpm-workspace.yaml. Bun stores patch paths in package.json.

Released under the MIT License.