thats-me/backend/vite.config.js
Kevin Adametz c62234e1ca docker setup
# Conflicts:
#	.gitignore
#	backend/vite.config.js
#	frontend/package-lock.json
2026-03-06 13:46:43 +01:00

62 lines
1.6 KiB
JavaScript

/**
* Vite-Konfiguration für Backend (Thats-Me)
* - Domain: thats-me.test
* - Port: 5173
* - Verwendet FluxUI
* - Build-Verzeichnis: public/build/thats-me
*
* Starten mit: npm run dev
*/
import { defineConfig } from "vite";
import laravel from "laravel-vite-plugin";
import tailwindcss from "@tailwindcss/vite";
const httpsConfig =
process.env.NODE_ENV === "production"
? {
// In Produktion: echte Zertifikate verwenden
key: process.env.SSL_KEY_PATH,
cert: process.env.SSL_CERT_PATH,
}
: true; // Self-signed für Entwicklung
export default defineConfig({
plugins: [
laravel({
input: ["resources/css/app.css", "resources/js/app.js"],
refresh: [`resources/views/**/*`],
}),
tailwindcss(),
],
server: {
https: false, // Traefik übernimmt SSL
cors: {
origin: ["https://thats-me.test", "https://assets.thats-me.test"],
credentials: true,
},
host: "0.0.0.0",
port: 5173,
strictPort: true,
allowedHosts: [
"assets.thats-me.test",
"thats-me.test",
"localhost",
"0.0.0.0",
],
hmr: {
host: "assets.thats-me.test",
protocol: "wss",
},
origin: "https://assets.thats-me.test", // Ohne Port!
},
build: {
outDir: "public/build/thats-me",
assetsDir: "",
manifest: "manifest.json",
rollupOptions: {
output: {
manualChunks: undefined,
},
},
},
});