Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

fix(build): stop vp from replaying stale typechecks and builds

Tin620c033f5061
diff --git a/apps/api/vite.config.ts b/apps/api/vite.config.ts
index b8a05da26..33e2dba2a 100644
--- a/apps/api/vite.config.ts
+++ b/apps/api/vite.config.ts
@@ -10,8 +10,12 @@ export default defineConfig({
{ task: "build", from: ["dependencies", "devDependencies"] },
],
cache: {
+ // `auto` can't see what native tools (tsc 7, esbuild) read, so list
+ // the sources explicitly or edits replay a stale build.
input: [
{ auto: true },
+ "src/**",
+ "package.json",
".env*",
{ pattern: ".env*", base: "workspace" },
],
@@ -23,14 +27,9 @@ export default defineConfig({
dependsOn: [
{ task: "build", from: ["dependencies", "devDependencies"] },
],
- cache: {
- input: [
- { auto: true },
- ".env*",
- { pattern: ".env*", base: "workspace" },
- ],
- output: [],
- },
+ // Typechecks read sources across the workspace and `auto` can't trace
+ // tsc 7, so a cached result can be stale; always run them (like cli).
+ cache: false,
},
"test:run": {
command: "vp test run --config vitest.config.ts",
diff --git a/apps/site/vite.config.ts b/apps/site/vite.config.ts
index b5dcc4b4c..646fd0efe 100644
--- a/apps/site/vite.config.ts
+++ b/apps/site/vite.config.ts
@@ -23,14 +23,9 @@ export default defineConfig({
dependsOn: [
{ task: "build", from: ["dependencies", "devDependencies"] },
],
- cache: {
- input: [
- { auto: true },
- ".env*",
- { pattern: ".env*", base: "workspace" },
- ],
- output: [],
- },
+ // Typechecks read sources across the workspace and `auto` can't trace
+ // tsc 7, so a cached result can be stale; always run them (like cli).
+ cache: false,
},
},
},
diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts
index 77e370c4a..aacbae8d3 100644
--- a/apps/web/vite.config.ts
+++ b/apps/web/vite.config.ts
@@ -28,14 +28,9 @@ export default defineConfig({
dependsOn: [
{ task: "build", from: ["dependencies", "devDependencies"] },
],
- cache: {
- input: [
- { auto: true },
- ".env*",
- { pattern: ".env*", base: "workspace" },
- ],
- output: [],
- },
+ // Typechecks read sources across the workspace and `auto` can't trace
+ // tsc 7, so a cached result can be stale; always run them (like cli).
+ cache: false,
},
"test:run": {
command: "vp test run --config vitest.config.ts",
diff --git a/packages/email/vite.config.ts b/packages/email/vite.config.ts
index 3b072df0c..9595c9f17 100644
--- a/packages/email/vite.config.ts
+++ b/packages/email/vite.config.ts
@@ -10,8 +10,13 @@ export default defineConfig({
{ task: "build", from: ["dependencies", "devDependencies"] },
],
cache: {
+ // `auto` can't see what native tools (tsc 7, esbuild) read, so list
+ // the sources explicitly or edits replay a stale build.
input: [
{ auto: true },
+ "src/**",
+ "tsconfig.json",
+ "package.json",
".env*",
{ pattern: ".env*", base: "workspace" },
],
diff --git a/packages/libs/vite.config.ts b/packages/libs/vite.config.ts
index 90a180ed5..1f5fdaf08 100644
--- a/packages/libs/vite.config.ts
+++ b/packages/libs/vite.config.ts
@@ -8,14 +8,9 @@ export default defineConfig({
dependsOn: [
{ task: "build", from: ["dependencies", "devDependencies"] },
],
- cache: {
- input: [
- { auto: true },
- ".env*",
- { pattern: ".env*", base: "workspace" },
- ],
- output: [],
- },
+ // Typechecks read sources across the workspace and `auto` can't trace
+ // tsc 7, so a cached result can be stale; always run them (like cli).
+ cache: false,
},
"test:run": {
command: "vp test run --config vitest.config.ts",
diff --git a/packages/permissions/vite.config.ts b/packages/permissions/vite.config.ts
index b88b19770..caec6606d 100644
--- a/packages/permissions/vite.config.ts
+++ b/packages/permissions/vite.config.ts
@@ -11,6 +11,8 @@ export default defineConfig({
cache: {
input: [
{ auto: true },
+ "src/**",
+ "tsconfig.json",
".env*",
{ pattern: ".env*", base: "workspace" },
],
diff --git a/packages/planka-import/vite.config.ts b/packages/planka-import/vite.config.ts
index f42b17cb3..1b51d2afe 100644
--- a/packages/planka-import/vite.config.ts
+++ b/packages/planka-import/vite.config.ts
@@ -9,8 +9,13 @@ export default defineConfig({
{ task: "build", from: ["dependencies", "devDependencies"] },
],
cache: {
+ // `auto` can't see what native tools (tsc 7, esbuild) read, so list
+ // the sources explicitly or edits replay a stale build.
input: [
{ auto: true },
+ "src/**",
+ "tsconfig.json",
+ "package.json",
".env*",
{ pattern: ".env*", base: "workspace" },
],