Improve check error performance by off-loading to worker thread w/ incremental compilation (#575)

This commit is contained in:
Will Chen
2025-07-07 12:47:33 -07:00
committed by GitHub
parent 97b5c29f11
commit bc38f9b2d7
22 changed files with 695 additions and 396 deletions

29
vite.worker.config.mts Normal file
View File

@@ -0,0 +1,29 @@
import { defineConfig } from "vite";
import path from "path";
// https://vitejs.dev/config
export default defineConfig({
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
build: {
sourcemap: true,
// target: "node16",
lib: {
entry: path.resolve(__dirname, "workers/tsc/tsc_worker.ts"),
name: "tsc_worker",
fileName: "tsc_worker",
formats: ["cjs"],
},
rollupOptions: {
external: ["node:fs", "node:path", "node:worker_threads", "typescript"],
// output: {
// dir: "dist/workers/tsc",
// },
},
// outDir: "dist/workers/tsc",
// emptyOutDir: true,
},
});