- Fix Vite alias to resolve @hai/core to types-only module (avoids Node.js deps in browser bundle) - Add tsconfig.app.json for client-side typecheck - Fix server.ts return type annotation - Update imports to use @hai/core (resolved via Vite alias) - Add base project files needed for workspace
23 lines
434 B
TypeScript
23 lines
434 B
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import { resolve } from "node:path";
|
|
|
|
export default defineConfig({
|
|
root: "app",
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
"@hai/core": resolve(__dirname, "../core/src/types.ts"),
|
|
},
|
|
},
|
|
build: {
|
|
outDir: "../dist/client",
|
|
emptyOutDir: true,
|
|
},
|
|
server: {
|
|
proxy: {
|
|
"/api": "http://localhost:3000",
|
|
},
|
|
},
|
|
});
|