nx/docs/shared/reference/sitemap.md
Colum Ferry 06089663c6
feat(js): add copy-workspace-modules executor (#31545)
## Current Behavior

When building applications that depend on workspace libraries for
deployment (particularly in containerized environments like Docker),
developers must manually handle copying workspace dependencies and
updating package.json references.

This creates friction when trying to deploy applications that consume
workspace libraries, as the build output doesn't contain the necessary
workspace dependencies and the package.json still references them with
`workspace:` protocol which doesn't work outside the workspace context.

  ## Expected Behavior

With the new `@nx/js:copy-workspace-modules` executor, developers can
automatically prepare their built applications for deployment by:

1. **Automatically copying workspace dependencies**: The executor scans
the application's package.json for workspace dependencies (those with
`workspace:` or `file:` version specifiers) and copies the source code
of these dependencies into a `workspace_modules` directory within the
build output

---------

Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
2025-06-18 13:50:01 +01:00

62 KiB