Improve application responsiveness and background processing

This commit is contained in:
2026-10-04 19:56:06 -04:00
parent 1392a082da
commit ed004ddbcf
70 changed files with 1324 additions and 345 deletions
+17
View File
@@ -0,0 +1,17 @@
import { defineConfig } from 'vite';
import { resolve } from 'node:path';
// Build the same report implementations for Node workers. Their database is
// read-only; migrations and all application writes stay in the controller.
export default defineConfig({
plugins: [{ name: 'report-database', enforce: 'pre', resolveId(source) {
if (source.endsWith('/db/index.js')) return resolve('src/lib/server/reports/database.ts');
} }],
build: {
ssr: true, outDir: '.svelte-kit/reports', emptyOutDir: true,
rollupOptions: {
input: 'src/lib/server/reports/worker.ts', external: ['better-sqlite3'],
output: { entryFileNames: 'worker.mjs' }
}
}
});