It would be great feature. For example, when building packages with swc, and still need typechecks between packages. My solution on monorepo i’m working on, with 20+ packages. turbo.json { "pipeline": { "build": { "dependsOn": ["types", "^build"], "outputs": ["dist/**", ".next/**"] }, "types": { "cache": false, "outputs": ["typings/**"] }, "watch": { "cache": false } } } root package.json { "name": "root", "private": true, "scripts": { "build": "turbo run build", "watch": "turbo run watch --parallel" } } packages/my-helpers/package.json { "name": "my-helpers", "scripts": { "types": "tsc --emitDeclarationsOnly", "watch": "chokidar 'src/**/*.js' 'src/**/*.ts' -c 'pnpm -wc exec turbo run types --filter=...^my-helpers'", } } This solution is nice, because i can see, that changes in one package will affect another package in scope. There are some drawbacks in this:
As i see it. Would be nice something like this in turbo. turbo.json { "pipeline": { "build": { "dependsOn": ["types", "^build"], "outputs": ["dist/**", ".next/**"] }, "types": { "outputs": ["typings/**"] } } } root package.json { "name": "root", "private": true, "scripts": { "watch": "turbo run types --watch" } } packages/my-lib/package.json { "name": "my-lib", "scripts": { "types": "tsc --emitDeclarationsOnly" }, "turboWatch": [ "src/**/*.js", "src/**/*.ts", ] } Watch mode, should:
Then running |
Leave A Comment