- vite.shared.js als gemeinsame Quelle fuer Ports, Hot-Files, HMR-Hosts und CORS-Origins der beiden Vite-Builds (Portal/Web) - App\Support\DomainAssetContext kapselt die Vite-Build-Directory- Konfiguration pro Domain (ThemeServiceProvider + Auth-Layout nutzen ihn) - Tailwind-Portal-Content-Globs auf die tatsaechliche View-Struktur gezogen - Dev-Beispiel-Routen + Tests (DomainAssetContextTest, DevExampleRoutesTest) - Aufraeumen: versehentliche Leerdatei dev:web entfernt Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
65 lines
1.7 KiB
JavaScript
65 lines
1.7 KiB
JavaScript
/**
|
|
* Vite-Konfiguration für Backend/Admin (FluxUI)
|
|
* - Domain: pressekonto.test (Admin, Customer, Auth)
|
|
* - Asset-Subdomain: assets.pressekonto.test
|
|
* - Port: 5177
|
|
* - Build: public/build/portal
|
|
*
|
|
* Öffentliche Hub-Landing und Frontends → vite.web.config.js (dev:web)
|
|
*
|
|
* Starten mit: npm run dev:portal
|
|
*/
|
|
import { defineConfig } from "vite";
|
|
import laravel from "laravel-vite-plugin";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import {
|
|
PORTAL_HMR_HOST,
|
|
PORTAL_HOT_FILE,
|
|
PORTAL_PORT,
|
|
createWatchIgnored,
|
|
portalRefreshPaths,
|
|
portalWatchDirs,
|
|
} from "./vite.shared.js";
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
laravel({
|
|
input: [
|
|
"resources/css/portal.css",
|
|
"resources/js/app.js",
|
|
"resources/js/portal-form-hooks.js",
|
|
],
|
|
refresh: portalRefreshPaths,
|
|
hotFile: PORTAL_HOT_FILE,
|
|
}),
|
|
tailwindcss({
|
|
config: "./tailwind.portal.config.js",
|
|
}),
|
|
],
|
|
server: {
|
|
https: false,
|
|
cors: true,
|
|
host: "0.0.0.0",
|
|
port: PORTAL_PORT,
|
|
strictPort: true,
|
|
allowedHosts: ["pressekonto.test", PORTAL_HMR_HOST, "localhost", "0.0.0.0"],
|
|
watch: {
|
|
ignored: createWatchIgnored(portalWatchDirs),
|
|
},
|
|
hmr: {
|
|
host: PORTAL_HMR_HOST,
|
|
protocol: "wss",
|
|
},
|
|
origin: `https://${PORTAL_HMR_HOST}`,
|
|
},
|
|
build: {
|
|
outDir: "public/build/portal",
|
|
assetsDir: "",
|
|
manifest: "manifest.json",
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: undefined,
|
|
},
|
|
},
|
|
},
|
|
});
|