diff --git a/packages/astro/package.json b/packages/astro/package.json index f7c3f35da64b..22690c7d6d05 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -88,5 +88,18 @@ }, "astro": { "external": true + }, + "nx": { + "targets": { + "build:transpile": { + "outputs": [ + "{projectRoot}/build/esm", + "{projectRoot}/build/cjs", + "{projectRoot}/build/npm/esm", + "{projectRoot}/build/npm/cjs", + "{projectRoot}/build/import-hook.mjs" + ] + } + } } } diff --git a/packages/aws-serverless/package.json b/packages/aws-serverless/package.json index c957bab5f64c..fa061388be7e 100644 --- a/packages/aws-serverless/package.json +++ b/packages/aws-serverless/package.json @@ -108,7 +108,8 @@ "{projectRoot}/build/npm/cjs", "{projectRoot}/build/npm/run-lambda-handler.mjs", "{projectRoot}/build/npm/run-lambda-handler.mjs.map", - "{projectRoot}/build/lambda-extension" + "{projectRoot}/build/lambda-extension", + "{projectRoot}/build/import-hook.mjs" ], "cache": true }, diff --git a/packages/deno/package.json b/packages/deno/package.json index 25541f23eee6..0ba8303daf79 100644 --- a/packages/deno/package.json +++ b/packages/deno/package.json @@ -64,12 +64,13 @@ "targets": { "build:transpile": { "outputs": [ - "{projectRoot}/build" + "{projectRoot}/build", + "!{projectRoot}/build/esm/**/*.d.ts" ] }, "build:types": { "outputs": [ - "{projectRoot}/build-types" + "{projectRoot}/build/esm/**/*.d.ts" ] } } diff --git a/packages/google-cloud-serverless/package.json b/packages/google-cloud-serverless/package.json index b36eb35e039d..65dff6ffc4db 100644 --- a/packages/google-cloud-serverless/package.json +++ b/packages/google-cloud-serverless/package.json @@ -79,5 +79,18 @@ "volta": { "extends": "../../package.json" }, - "sideEffects": false + "sideEffects": false, + "nx": { + "targets": { + "build:transpile": { + "outputs": [ + "{projectRoot}/build/esm", + "{projectRoot}/build/cjs", + "{projectRoot}/build/npm/esm", + "{projectRoot}/build/npm/cjs", + "{projectRoot}/build/import-hook.mjs" + ] + } + } + } } diff --git a/packages/nestjs/package.json b/packages/nestjs/package.json index ee280110eb85..d53568832a55 100644 --- a/packages/nestjs/package.json +++ b/packages/nestjs/package.json @@ -95,7 +95,8 @@ ], "outputs": [ "{projectRoot}/build/types", - "{projectRoot}/*.d.ts" + "{projectRoot}/*.d.ts", + "{projectRoot}/*.d.ts.map" ], "cache": true } diff --git a/packages/remix/package.json b/packages/remix/package.json index e1b4fc5d3f4f..301894a7deaa 100644 --- a/packages/remix/package.json +++ b/packages/remix/package.json @@ -100,5 +100,18 @@ "volta": { "extends": "../../package.json" }, - "sideEffects": false + "sideEffects": false, + "nx": { + "targets": { + "build:transpile": { + "outputs": [ + "{projectRoot}/build/esm", + "{projectRoot}/build/cjs", + "{projectRoot}/build/npm/esm", + "{projectRoot}/build/npm/cjs", + "{projectRoot}/build/import-hook.mjs" + ] + } + } + } } diff --git a/packages/tanstackstart-react/package.json b/packages/tanstackstart-react/package.json index 14ac56214323..b556b1187638 100644 --- a/packages/tanstackstart-react/package.json +++ b/packages/tanstackstart-react/package.json @@ -87,5 +87,18 @@ "volta": { "extends": "../../package.json" }, - "sideEffects": false + "sideEffects": false, + "nx": { + "targets": { + "build:transpile": { + "outputs": [ + "{projectRoot}/build/esm", + "{projectRoot}/build/cjs", + "{projectRoot}/build/npm/esm", + "{projectRoot}/build/npm/cjs", + "{projectRoot}/build/import-hook.mjs" + ] + } + } + } } diff --git a/packages/vue/package.json b/packages/vue/package.json index 6972b425aeda..3658e06546b0 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -89,5 +89,16 @@ "volta": { "extends": "../../package.json" }, - "sideEffects": false + "sideEffects": false, + "nx": { + "targets": { + "build:types": { + "outputs": [ + "{projectRoot}/build/types", + "{projectRoot}/*.d.ts", + "{projectRoot}/*.d.ts.map" + ] + } + } + } } diff --git a/scripts/ci-print-build-artifact-paths.mjs b/scripts/ci-print-build-artifact-paths.mjs index 690b995d78b2..f4d03b6d8b0b 100644 --- a/scripts/ci-print-build-artifact-paths.mjs +++ b/scripts/ci-print-build-artifact-paths.mjs @@ -61,6 +61,12 @@ for (const node of Object.values(graph.nodes)) { } for (const output of outputs) { + // Negated outputs only narrow a target's Nx cache ownership to keep parallel targets' + // outputs disjoint; they are not files to exclude from the uploaded artifact — those files + // are emitted and owned by another target and must still be uploaded via its output. + if (output.startsWith('!')) { + continue; + } const rel = output.replace(/\{projectRoot\}/g, root).replace(/\\/g, '/'); const prefix = `${kind}/${pkg}/`; if (!rel.startsWith(prefix)) {