## 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>
38 lines
1.5 KiB
JSON
38 lines
1.5 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/schema",
|
|
"executors": {
|
|
"copy-workspace-modules": {
|
|
"implementation": "./src/executors/copy-workspace-modules/copy-workspace-modules",
|
|
"schema": "./src/executors/copy-workspace-modules/schema.json",
|
|
"description": "Copies Workspace Modules into the output directory after a build to prepare it for use with Docker or alternatives."
|
|
},
|
|
"tsc": {
|
|
"implementation": "./src/executors/tsc/tsc.impl",
|
|
"batchImplementation": "./src/executors/tsc/tsc.batch-impl",
|
|
"schema": "./src/executors/tsc/schema.json",
|
|
"description": "Build a project using TypeScript."
|
|
},
|
|
"swc": {
|
|
"implementation": "./src/executors/swc/swc.impl",
|
|
"schema": "./src/executors/swc/schema.json",
|
|
"description": "Build a project using SWC."
|
|
},
|
|
"node": {
|
|
"implementation": "./src/executors/node/node.impl",
|
|
"schema": "./src/executors/node/schema.json",
|
|
"description": "Execute a Node application."
|
|
},
|
|
"release-publish": {
|
|
"implementation": "./src/executors/release-publish/release-publish.impl",
|
|
"schema": "./src/executors/release-publish/schema.json",
|
|
"description": "DO NOT INVOKE DIRECTLY WITH `nx run`. Use `nx release publish` instead.",
|
|
"hidden": true
|
|
},
|
|
"verdaccio": {
|
|
"implementation": "./src/executors/verdaccio/verdaccio.impl",
|
|
"schema": "./src/executors/verdaccio/schema.json",
|
|
"description": "Start local registry with verdaccio"
|
|
}
|
|
}
|
|
}
|