clients/nx.json
Addison Beck dddaba1f35
fix(nx): clear build dependsOn workspace default (#21203)
The bitwarden-clients workspace uses source-direct webpack bundling: apps
bundle libs via @bitwarden/* path aliases in tsconfig.base.json that resolve
to sibling lib source, not dist artifacts.

The workspace default targetDefaults.build.dependsOn: ["^build"] is an
artifact-based declaration that did not match the codebase. Combined with
@nx/js plugin auto-inference of build targets on every lib with a
tsconfig.lib.json, it forces nx build <app> to walk into leaf libs that
cannot compile standalone with tsc. This causes failed builds.

This commit changes the workspace default to [], making the declaration match
the actual bundling pattern. Apps no longer pull broken leaf libs through
their build chain, instead using their dependencies with their aliases.
2026-06-11 16:26:06 +02:00

44 lines
1.0 KiB
JSON

{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"cacheDirectory": ".nx/cache",
"defaultBase": "main",
"namedInputs": {
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"production": ["default", "!{projectRoot}/**/*.spec.ts", "!{projectRoot}/tsconfig.spec.json"],
"sharedGlobals": ["{workspaceRoot}/tsconfig.base.json", "{workspaceRoot}/package.json"]
},
"plugins": [
{
"plugin": "@nx/js",
"options": {
"compiler": "tsc",
"configName": "tsconfig.lib.json",
"targetName": "build"
}
},
{
"plugin": "@nx/jest/plugin",
"options": {
"targetName": "test"
}
},
{
"plugin": "@nx/eslint/plugin",
"options": {
"targetName": "lint"
}
},
"@bitwarden/nx-plugin"
],
"parallel": 4,
"targetDefaults": {
"build": {
"dependsOn": [],
"inputs": ["production", "^production"],
"outputs": ["{options.outputPath}"],
"cache": true
}
},
"analytics": false
}