Files
FrenoCorp/vite.config.ts
Michael Freno 79d153f75a FRE-592: Fix remaining code review blockers and add tests
- Replace in-memory Maps with Drizzle ORM queries for all CRUD operations
- Use integer IDs matching SQLite schema instead of UUIDs
- Fix scriptId to projectId inconsistency in characters and scenes
- Add project ownership verification on all mutation procedures
- Make getCharacter/getScene procedures protected (not public)
- Proper JWT-based userId validation via context
- Add cascade delete for characters/relationships/scenes on project deletion
- Add verifyProjectOwnership helper for authorization checks
- Rewrite tests with createCallerFactory pattern for tRPC v11
- Use better-sqlite3 for in-memory test database
- Split vitest config into separate file from vite config
2026-04-24 08:31:42 -04:00

34 lines
677 B
TypeScript

import { defineConfig } from 'vite';
import solid from 'vite-plugin-solid';
import { resolve } from 'path';
export default defineConfig({
plugins: [solid()],
resolve: {
alias: {
'@lib': resolve(__dirname, './src/lib'),
'@components': resolve(__dirname, './src/components'),
'@types': resolve(__dirname, './src/types'),
},
},
build: {
target: 'esnext',
outDir: 'dist',
sourcemap: true,
rollupOptions: {
input: {
main: resolve(__dirname, 'index.html'),
},
},
},
server: {
port: 3000,
proxy: {
'/sync': {
target: 'ws://localhost:8080',
ws: true,
},
},
},
});