-
fix(bundling): declare tsconfig.json as input for esbuild targets (#35432)
发布于
2026-04-24 15:37:00 +00:00 Current Behavior
The
@nx/esbuild:esbuildexecutor callsisUsingTsSolutionSetupat
task runtime, which readsextends,files, andincludefrom the
workspace-roottsconfig.json. Targets using the executor do not
declare those fields as inputs, so cache hashes do not reflect changes
to them and builds can hit stale cache entries after atsconfig.json
edit.Expected Behavior
Targets using the
@nx/esbuild:esbuildexecutor include a field-scoped
{workspaceRoot}/tsconfig.jsoninput covering exactly the fields the
executor reads, so hashes change when those fields change and remain
unaffected by unrelated edits.addBuildTargetDefaultsgains an optionalextraInputsparameter so
plugin generators can extend the default/production inputs when seeding
executor-keyed target defaults. Existing call sites are unchanged.- The
@nx/esbuild:configurationgenerator uses that parameter to add a
field-scoped{workspaceRoot}/tsconfig.jsoninput (fields:extends,
files,include) to the@nx/esbuild:esbuildtarget defaults it
seeds. - This repo's
nx.jsongains the same executor-keyed target defaults so
tools-documentation-create-embeddings(the only esbuild target in the
repo) inherits the fix.dependsOnmirrors the existingbuild
target-name default to preserve the inferredtypecheckand
build-basedependencies.
下载附件