Skip to content

Commit 615ffae

Browse files
fix(template-generator): exclude next cache from turbo outputs (#1065)
1 parent 0408a67 commit 615ffae

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

apps/web/content/docs/project-structure.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ Generated only if you chose the Nx addon.
461461
"tasks": {
462462
"build": {
463463
"dependsOn": ["^build"],
464-
"outputs": ["dist/**", ".next/**"]
464+
"outputs": ["dist/**", ".next/**", "!.next/cache/**"]
465465
},
466466
"dev": {
467467
"cache": false,

packages/template-generator/src/processors/turbo-generator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ function generateTurboConfig(config: ProjectConfig): TurboConfig {
5858
function getBaseTasks(frontend: string[]): Record<string, TurboTask> {
5959
// Build outputs per framework:
6060
// - Vite-based (tanstack-router, react-router, tanstack-start, solid, svelte): dist/**
61-
// - Next.js: .next/**
61+
// - Next.js: .next/** excluding .next/cache/**
6262
// - Nuxt: .nuxt/**, .output/**
6363
const buildOutputs = ["dist/**"];
6464

6565
if (frontend.includes("next")) {
66-
buildOutputs.push(".next/**");
66+
buildOutputs.push(".next/**", "!.next/cache/**");
6767
}
6868

6969
if (frontend.includes("nuxt")) {

0 commit comments

Comments
 (0)