Skip to content

Commit baa6ba4

Browse files
authored
build: Fix nx cache outputs (#10824)
After this annoying me for quite some time, I finally figured out what the problem with our build was - we had our nx cache outputs wrong. This lead to conflicts when caches were restored etc. Now, this should be more narrow & correct in what it caches per step, leading to caching actually working (hopefully..)
1 parent a6a4e53 commit baa6ba4

File tree

4 files changed

+25
-10
lines changed

4 files changed

+25
-10
lines changed

nx.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
"build:transpile": {
2828
"inputs": ["production", "^production"],
2929
"dependsOn": ["^build:transpile"],
30-
"outputs": ["{projectRoot}/build"]
30+
"outputs": ["{projectRoot}/build/{esm,cjs}", "{projectRoot}/build/npm/{esm,cjs}"]
3131
},
3232
"build:types": {
3333
"inputs": ["production", "^production"],
3434
"dependsOn": ["^build:types"],
35-
"outputs": ["{projectRoot}/build/**/*.d.ts"]
35+
"outputs": ["{projectRoot}/build/**/*.d.ts", "{projectRoot}/build/**/*.d.ts.map"]
3636
},
3737
"lint": {
3838
"inputs": ["default"],

packages/angular-ivy/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@
6565
"dependsOn": [
6666
"^build:transpile",
6767
"^build:types"
68+
],
69+
"outputs": [
70+
"{projectRoot}/build/esm2015",
71+
"{projectRoot}/build/fesm2015",
72+
"{projectRoot}/build/*.{md,json}",
73+
"{projectRoot}/build/LICENCE"
6874
]
6975
}
7076
}

packages/angular/package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,12 @@
6666
"nx": {
6767
"targets": {
6868
"build:transpile": {
69-
"dependsOn": [
70-
"^build:transpile",
71-
"^build:types"
69+
"dependsOn": ["^build:transpile", "^build:types"],
70+
"outputs": [
71+
"{projectRoot}/build/esm2015",
72+
"{projectRoot}/build/fesm2015",
73+
"{projectRoot}/build/*.{md,json}",
74+
"{projectRoot}/build/LICENCE"
7275
]
7376
}
7477
}

packages/deno/package.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@
1111
"publishConfig": {
1212
"access": "public"
1313
},
14-
"files": [
15-
"index.mjs",
16-
"index.mjs.map",
17-
"index.d.ts"
18-
],
14+
"files": ["index.mjs", "index.mjs.map", "index.d.ts"],
1915
"dependencies": {
2016
"@sentry/browser": "7.100.0",
2117
"@sentry/core": "7.100.0",
@@ -61,5 +57,15 @@
6157
"skipTypeImports": true
6258
}
6359
}
60+
},
61+
"nx": {
62+
"targets": {
63+
"build:transpile": {
64+
"outputs": ["{projectRoot}/build"]
65+
},
66+
"build:types": {
67+
"outputs": ["{projectRoot}/build-types"]
68+
}
69+
}
6470
}
6571
}

0 commit comments

Comments
 (0)