Files
Athou_commafeed/commafeed-client/vite.config.ts

65 lines
1.9 KiB
TypeScript
Raw Normal View History

import { lingui } from "@lingui/vite-plugin"
import react from "@vitejs/plugin-react"
2025-04-09 20:02:21 +02:00
import { defineConfig } from "vite"
import checker from "vite-plugin-checker"
import tsconfigPaths from "vite-tsconfig-paths"
// https://vitejs.dev/config/
export default defineConfig(() => ({
plugins: [
react({
babel: {
plugins: [
// support for lingui macros
// needs to be before the react compiler plugin
"@lingui/babel-plugin-lingui-macro",
// react compiler
["babel-plugin-react-compiler", { target: "19" }],
],
},
}),
lingui(),
tsconfigPaths(),
checker({
typescript: true,
biome: {
command: "check",
flags: "--error-on-warnings",
},
}),
],
base: "./",
server: {
port: 8082,
proxy: {
"/rest": "http://localhost:8083",
2023-06-05 10:17:00 +02:00
"/next": "http://localhost:8083",
"/ws": "ws://localhost:8083",
2025-07-28 07:33:58 +02:00
"/openapi": "http://localhost:8083",
"/api-documentation": "http://localhost:8083",
2023-05-05 14:03:28 +02:00
"/custom_css.css": "http://localhost:8083",
"/custom_js.js": "http://localhost:8083",
2024-08-07 08:10:14 +02:00
"/j_security_check": "http://localhost:8083",
2024-02-20 10:42:56 +01:00
"/logout": "http://localhost:8083",
},
},
build: {
2024-01-05 20:26:46 +01:00
chunkSizeWarningLimit: 3500,
rollupOptions: {
output: {
manualChunks: id => {
// output mantine as its own chunk because it is quite large
if (id.includes("@mantine")) {
return "mantine"
}
},
},
},
},
test: {
environment: "jsdom",
2025-02-20 10:02:54 +01:00
globals: true,
setupFiles: "./src/setupTests.ts",
},
}))