- Install @tanstack/react-query v5 + devtools - Create core/query-client.ts with WS-optimized defaults (staleTime: Infinity) - Create QueryProvider and wire into root layout - Add @core/* path alias to tsconfig + vitest - Add useWorkspaceId() bridge hook for query key scoping Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
19 lines
431 B
TypeScript
19 lines
431 B
TypeScript
import { defineConfig } from "vitest/config";
|
|
import react from "@vitejs/plugin-react";
|
|
import path from "path";
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
test: {
|
|
environment: "jsdom",
|
|
globals: true,
|
|
setupFiles: ["./test/setup.ts"],
|
|
include: ["**/*.test.{ts,tsx}"],
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "."),
|
|
"@core": path.resolve(__dirname, "core"),
|
|
},
|
|
},
|
|
});
|