Skip to content

Commit 244c236

Browse files
committed
fix(nextjs): Update glob for cache output
closes: #30338
1 parent 29d9d15 commit 244c236

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/next/src/plugins/__snapshots__/plugin.spec.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ exports[`@nx/next/plugin integrated projects should create nodes 1`] = `
3434
"tty": false,
3535
},
3636
"outputs": [
37-
"{workspaceRoot}/my-app/.next",
37+
"{workspaceRoot}/my-app/.next/!(cache)/**/*",
3838
"{workspaceRoot}/my-app/.next/!(cache)",
3939
],
4040
},
@@ -109,7 +109,7 @@ exports[`@nx/next/plugin root projects should create nodes 1`] = `
109109
"tty": false,
110110
},
111111
"outputs": [
112-
"{projectRoot}/.next",
112+
"{projectRoot}/.next/!(cache)/**/*",
113113
"{projectRoot}/.next/!(cache)",
114114
],
115115
},

packages/next/src/plugins/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ async function getBuildTargetConfig(
207207
dependsOn: ['^build'],
208208
cache: true,
209209
inputs: getInputs(namedInputs),
210-
outputs: [nextOutputPath, `${nextOutputPath}/!(cache)`],
210+
outputs: [`${nextOutputPath}/!(cache)/**/*`, `${nextOutputPath}/!(cache)`],
211211
};
212212

213213
// TODO(ndcunningham): Update this to be consider different versions of next.js which is running

0 commit comments

Comments
 (0)