mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
65 lines
1.9 KiB
TypeScript
65 lines
1.9 KiB
TypeScript
import { lingui } from "@lingui/vite-plugin"
|
|
import react from "@vitejs/plugin-react"
|
|
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",
|
|
"/next": "http://localhost:8083",
|
|
"/ws": "ws://localhost:8083",
|
|
"/openapi": "http://localhost:8083",
|
|
"/api-documentation": "http://localhost:8083",
|
|
"/custom_css.css": "http://localhost:8083",
|
|
"/custom_js.js": "http://localhost:8083",
|
|
"/j_security_check": "http://localhost:8083",
|
|
"/logout": "http://localhost:8083",
|
|
},
|
|
},
|
|
build: {
|
|
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",
|
|
globals: true,
|
|
setupFiles: "./src/setupTests.ts",
|
|
},
|
|
}))
|