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

59 lines
1.7 KiB
TypeScript
Raw Normal View History

import { lingui } from "@lingui/vite-plugin"
import react from "@vitejs/plugin-react"
import { visualizer } from "rollup-plugin-visualizer"
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: [["babel-plugin-react-compiler", { target: "19" }], "@lingui/babel-plugin-lingui-macro"],
},
}),
lingui(),
tsconfigPaths(),
visualizer(),
checker({
typescript: true,
biome: {
command: "check",
},
}),
],
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",
"/openapi.json": "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",
},
}))