continue-custom/gui/vite.config.ts
2025-04-07 13:02:46 -07:00

36 lines
985 B
TypeScript

import react from "@vitejs/plugin-react-swc";
import { resolve } from "path";
import tailwindcss from "tailwindcss";
import { defineConfig } from "vitest/config";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), tailwindcss()],
build: {
// Change the output .js filename to not include a hash
rollupOptions: {
input: {
index: resolve(__dirname, "index.html"),
indexConsole: resolve(__dirname, "indexConsole.html"),
},
output: {
entryFileNames: `assets/[name].js`,
chunkFileNames: `assets/[name].js`,
assetFileNames: `assets/[name].[ext]`,
},
},
},
server: {
cors: {
origin: "*",
methods: ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"],
allowedHeaders: ["*", "Content-Type", "Authorization"],
credentials: true,
},
},
test: {
globals: true,
environment: "jsdom",
setupFiles: "./src/util/test/setupTests.ts",
},
});