32 lines
856 B
TypeScript
32 lines
856 B
TypeScript
import react from "@vitejs/plugin-react-swc";
|
|
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: {
|
|
// external: ["vscode-webview"],
|
|
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",
|
|
},
|
|
});
|