35 lines
693 B
JavaScript
35 lines
693 B
JavaScript
import { defineConfig } from "vite";
|
|
|
|
export default defineConfig({
|
|
plugins: [],
|
|
build: {
|
|
outDir: "static/js", // Output directory for compiled JS
|
|
rollupOptions: {
|
|
output: {
|
|
entryFileNames: "[name].js",
|
|
chunkFileNames: "[name].js",
|
|
assetFileNames: "[name].[ext]",
|
|
},
|
|
input: {
|
|
interactive: "web/lib/index.ts",
|
|
},
|
|
onwarn: (entry, next) => {
|
|
if (
|
|
entry.loc?.file &&
|
|
/htmx\.esm\.js$/.test(entry.loc.file) &&
|
|
/Use of eval in/.test(entry.message)
|
|
) {
|
|
return;
|
|
}
|
|
return next(entry);
|
|
},
|
|
},
|
|
server: {
|
|
port: 3001,
|
|
proxy: {
|
|
"/api": "http://localhost:3000", // Proxy API requests to the Go server
|
|
},
|
|
},
|
|
},
|
|
});
|