diff --git a/.claude/skills/dist-build-migration/SKILL.md b/.claude/skills/dist-build-migration/SKILL.md index 2854558eb94..265883d956a 100644 --- a/.claude/skills/dist-build-migration/SKILL.md +++ b/.claude/skills/dist-build-migration/SKILL.md @@ -156,18 +156,13 @@ Add these sections: "options": { "packageRoot": "packages/{projectName}" } - }, - "build-base": { - "outputs": [ - "{projectRoot}/dist/**/*.{js,cjs,mjs,d.ts}", - "{projectRoot}/*.d.ts", - "{projectRoot}/src/**/*.d.ts" - ] } } } ``` +Do **not** override `build-base.outputs` in `project.json`. The `@nx/js/typescript` plugin reads `outDir` and `tsBuildInfoFile` from `tsconfig.lib.json` and infers the correct outputs (including the tsbuildinfo and the full set of file extensions). A hand-written override is almost always less complete than the inferred set. + Update the existing `build` target's `outputs` if they reference `{workspaceRoot}/dist/packages/` — they should now reference `{projectRoot}/dist/`. Also update `dependsOn` in the `build` target: replace `"^build"` with `"^build"` if it isn't already, and make sure `"build-base"` is listed. diff --git a/packages/devkit/project.json b/packages/devkit/project.json index a9d721f352c..daf0237e031 100644 --- a/packages/devkit/project.json +++ b/packages/devkit/project.json @@ -16,13 +16,6 @@ "packageRoot": "packages/{projectName}" } }, - "build-base": { - "outputs": [ - "{projectRoot}/dist/**/*.{js,cjs,mjs,d.ts}", - "{projectRoot}/*.d.ts", - "{projectRoot}/src/**/*.d.ts" - ] - }, "build": { "outputs": ["{projectRoot}/README.md"], "command": "node ./scripts/copy-readme.js devkit packages/devkit/readme-template.md packages/devkit/README.md",