2023-05-23 16:24:35 +02:00
|
|
|
import { lingui } from "@lingui/vite-plugin"
|
2026-03-13 22:17:04 +01:00
|
|
|
import babel from "@rolldown/plugin-babel"
|
|
|
|
|
import react, { reactCompilerPreset } from "@vitejs/plugin-react"
|
2025-04-09 20:02:21 +02:00
|
|
|
import { defineConfig } from "vite"
|
2024-09-11 14:44:02 +02:00
|
|
|
import checker from "vite-plugin-checker"
|
2022-08-13 10:56:07 +02:00
|
|
|
|
2024-09-11 14:44:02 +02:00
|
|
|
export default defineConfig(() => ({
|
2022-08-13 10:56:07 +02:00
|
|
|
plugins: [
|
2026-03-13 22:17:04 +01:00
|
|
|
react(),
|
|
|
|
|
babel({
|
|
|
|
|
presets: [reactCompilerPreset()],
|
|
|
|
|
plugins: ["@lingui/babel-plugin-lingui-macro"],
|
2022-08-13 10:56:07 +02:00
|
|
|
}),
|
2023-05-23 16:24:35 +02:00
|
|
|
lingui(),
|
2024-09-11 14:44:02 +02:00
|
|
|
checker({
|
|
|
|
|
typescript: true,
|
|
|
|
|
biome: {
|
|
|
|
|
command: "check",
|
2025-06-18 20:45:24 +02:00
|
|
|
flags: "--error-on-warnings",
|
2024-09-11 14:44:02 +02:00
|
|
|
},
|
2024-06-13 21:54:14 +02:00
|
|
|
}),
|
2022-08-13 10:56:07 +02:00
|
|
|
],
|
|
|
|
|
base: "./",
|
|
|
|
|
server: {
|
|
|
|
|
port: 8082,
|
|
|
|
|
proxy: {
|
|
|
|
|
"/rest": "http://localhost:8083",
|
2023-06-05 10:17:00 +02:00
|
|
|
"/next": "http://localhost:8083",
|
2023-01-17 21:14:38 +01:00
|
|
|
"/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",
|
2023-05-05 18:28:31 +02:00
|
|
|
"/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",
|
2022-08-13 10:56:07 +02:00
|
|
|
},
|
|
|
|
|
},
|
2026-03-13 22:17:04 +01:00
|
|
|
resolve: {
|
|
|
|
|
tsconfigPaths: true,
|
|
|
|
|
},
|
|
|
|
|
legacy: {
|
|
|
|
|
// required for websocket-heartbeat-js
|
|
|
|
|
inconsistentCjsInterop: true,
|
2022-08-13 10:56:07 +02:00
|
|
|
},
|
2024-09-10 16:22:23 +02:00
|
|
|
test: {
|
|
|
|
|
environment: "jsdom",
|
2025-02-20 10:02:54 +01:00
|
|
|
globals: true,
|
|
|
|
|
setupFiles: "./src/setupTests.ts",
|
2024-09-10 16:22:23 +02:00
|
|
|
},
|
2026-03-14 20:20:51 +01:00
|
|
|
build: {
|
|
|
|
|
chunkSizeWarningLimit: 4000,
|
|
|
|
|
rolldownOptions: {
|
|
|
|
|
output: {
|
|
|
|
|
codeSplitting: {
|
|
|
|
|
groups: [
|
|
|
|
|
// output mantine as its own chunk because it is quite large
|
|
|
|
|
{
|
|
|
|
|
name: "mantine",
|
|
|
|
|
test: "@mantine",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2024-01-05 20:48:25 +01:00
|
|
|
}))
|