Files
bookhoard/vite.config.ts
T
john-okeefe a62e4062a2 Add Vite configuration for TypeScript bundling
Created vite.config.ts with optimized settings for the Bookhoard project:
- Output directory: web/static/ (matches existing esbuild setup)
- Single entry point: web/src/main.ts
- Output file: main.js (preserves existing template references)
- ES2020 target for modern browser compatibility
- Source maps enabled for debugging
- esbuild minification for optimal bundle size
- emptyOutDir: false to preserve other static assets (htmx.min.js, CSS, images)

Configuration maintains the same build output structure as esbuild,
ensuring no changes needed to templates or deployment process.
2026-03-12 08:46:16 -04:00

17 lines
323 B
TypeScript

import { defineConfig } from "vite";
export default defineConfig({
build: {
outDir: "web/static",
emptyOutDir: false,
rollupOptions: {
input: "web/src/main.ts",
output: {
entryFileNames: "main.js",
},
},
target: "es2020",
sourcemap: true,
minify: "esbuild",
},
});