Skip to content

Commit 8f299b6

Browse files
authored
build: Improve nx caching strategy (#6731)
1. `build:tarball` is actually not cacheable 2. Make sure that we do not mark a package as needing to rebuild when tests change 3. Add missing dependencies for serverless build
1 parent 6fe893d commit 8f299b6

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

nx.json

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,24 @@
66
"cacheableOperations": [
77
"build:bundle",
88
"build:transpile",
9-
"build:tarball",
109
"build:types"
1110
]
1211
}
1312
}
1413
},
14+
"namedInputs": {
15+
"sharedGlobals": [
16+
"{workspaceRoot}/*.js",
17+
"{workspaceRoot}/*.json",
18+
"{workspaceRoot}/yarn.lock"
19+
],
20+
"default": [
21+
"{projectRoot}/**/*",
22+
"sharedGlobals",
23+
"!{projectRoot}/test/**/*",
24+
"!{projectRoot}/**/*.md"
25+
]
26+
},
1527
"targetDefaults": {
1628
"build:bundle": {
1729
"dependsOn": [
@@ -58,7 +70,12 @@
5870
"targets": {
5971
"@sentry/serverless": {
6072
"build:bundle": {
61-
"dependsOn": [],
73+
"dependsOn": [
74+
"^build:transpile",
75+
"build:transpile",
76+
"^build:types",
77+
"build:types"
78+
],
6279
"outputs": [
6380
"{projectRoot}/build/aws"
6481
]

0 commit comments

Comments
 (0)