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.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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",
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user