Skip to content

Commit 9c027fa

Browse files
chore(*): fix turbo.json for local dev (#9004)
1 parent d8fc1d7 commit 9c027fa

4 files changed

Lines changed: 26 additions & 4 deletions

File tree

.changeset/wicked-buses-hope.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

packages/localizations/tsdown.config.mts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import { defineConfig } from 'tsdown';
22

3-
export default defineConfig(overrideOptions => {
4-
const shouldPublish = !!overrideOptions.env?.publish;
3+
export default defineConfig(({ env, watch }) => {
4+
const shouldPublish = !!env?.publish;
55

66
return {
77
entry: ['src/*.ts'],
88
format: ['cjs', 'esm'],
99
fixedExtension: false,
10-
clean: true,
10+
// Keep the previous build in place during watch rebuilds so downstream
11+
// dev servers never resolve package exports against an empty dist.
12+
clean: !watch,
1113
minify: false,
1214
sourcemap: true,
1315
dts: true,

packages/shared/tsdown.config.mts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ export default defineConfig(({ watch, env }) => {
4444
{
4545
...common,
4646
dts: false,
47-
clean: true,
47+
// Keep the previous build in place during watch rebuilds so downstream
48+
// dev servers never resolve package exports against an empty dist.
49+
clean: !watch,
4850
external: ['react', 'react-dom'],
4951
onSuccess: shouldPublish ? 'pkglab pub --ping' : undefined,
5052
// Route rolldown's shared chunks into a nested `_chunks/` directory. The

turbo.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,22 @@
8080
"dev": {
8181
"cache": false
8282
},
83+
"@clerk/clerk-js#dev": {
84+
"cache": false,
85+
"dependsOn": ["@clerk/shared#build"]
86+
},
87+
"@clerk/ui#dev": {
88+
"cache": false,
89+
"dependsOn": ["@clerk/shared#build", "@clerk/localizations#build"]
90+
},
91+
"@clerk/shared#dev": {
92+
"cache": false,
93+
"dependsOn": ["@clerk/shared#build"]
94+
},
95+
"@clerk/localizations#dev": {
96+
"cache": false,
97+
"dependsOn": ["@clerk/localizations#build"]
98+
},
8399
"dev:current": {
84100
"cache": false,
85101
"dependsOn": ["^build", "dev"],

0 commit comments

Comments
 (0)