Elffuss BraidHub

kikocis/continue public

9c6973727fab · 1.3 KiBRawPermalink
1import react from "@vitejs/plugin-react-swc";
2import { resolve } from "path";
3import tailwindcss from "tailwindcss";
4import { defineConfig } from "vitest/config";
5
6// https://vitejs.dev/config/
7export default defineConfig({
8 plugins: [react(), tailwindcss()],
9 build: {
10 // Change the output .js filename to not include a hash
11 rollupOptions: {
12 input: {
13 index: resolve(__dirname, "index.html"),
14 indexConsole: resolve(__dirname, "indexConsole.html"),
15 },
16 output: {
17 entryFileNames: `assets/[name].js`,
18 chunkFileNames: `assets/[name].js`,
19 assetFileNames: `assets/[name].[ext]`,
20 },
21 },
22 },
23 server: {
24 cors: {
25 origin: "*",
26 methods: ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"],
27 allowedHeaders: ["*", "Content-Type", "Authorization"],
28 credentials: true,
29 },
30 },
31 test: {
32 globals: true,
33 environment: "jsdom",
34 setupFiles: "./src/util/test/setupTests.ts",
35 onConsoleLog(log, type) {
36 if (type === "stderr") {
37 if (
38 [
39 "contentEditable",
40 "An update to Chat inside a test was not wrapped in act",
41 ].some((text) => log.includes(text))
42 ) {
43 return false;
44 }
45 }
46 return true;
47 },
48 },
49});