66 lines
No EOL
2.1 KiB
JavaScript
66 lines
No EOL
2.1 KiB
JavaScript
import { defineConfig } from "vite";
|
|
import laravel from "laravel-vite-plugin";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
|
|
// SSL-Konfiguration - für Entwicklung ohne echte Zertifikate
|
|
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: [
|
|
// Web Theme CSS Dateien
|
|
"resources/css/web/theme-businessportal24.css",
|
|
"resources/css/web/theme-presseecho.css", // Neu: CSS für presseecho hinzugefügt, um beide Themes vorab zu kompilieren
|
|
"resources/js/app.js",
|
|
],
|
|
refresh: ["resources/views/web/**/*.blade.php"],
|
|
}),
|
|
tailwindcss({
|
|
config: "./tailwind.web.config.js",
|
|
}),
|
|
],
|
|
server: {
|
|
https: false, // Traefik übernimmt SSL, Vite läuft intern auf HTTP
|
|
cors: {
|
|
origin: [
|
|
"https://businessportal24.test",
|
|
"https://assets.businessportal24.test",
|
|
],
|
|
credentials: true,
|
|
},
|
|
host: "0.0.0.0",
|
|
port: 5178, // Web-spezifischer Port
|
|
strictPort: true,
|
|
allowedHosts: [
|
|
"assets.businessportal24.test",
|
|
"businessportal24.test",
|
|
"assets.presseecho.test", // Neu: presseecho-Host hinzugefügt
|
|
"presseecho.test", // Neu: presseecho-Host hinzugefügt
|
|
"localhost",
|
|
"0.0.0.0",
|
|
],
|
|
hmr: {
|
|
host: "assets.businessportal24.test",
|
|
protocol: "wss",
|
|
},
|
|
origin: "https://assets.businessportal24.test", // Ohne Port!
|
|
},
|
|
build: {
|
|
outDir: `public/build/web`,
|
|
assetsDir: "",
|
|
manifest: "manifest.json",
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: undefined,
|
|
},
|
|
},
|
|
},
|
|
}); |