Files
dealplustech/dealplustech-astro/node_modules/astro/dist/vite-plugin-integrations-container/index.js
Kunthawat Greethong 3ed9f3f3ff 🎨 Fix CSS: Import global.css + plain CSS styles
CSS was not being imported! Fixed:

 Added 'import ../styles/global.css' to BaseLayout.astro
 Rewrote CSS with plain CSS (not @apply which wasn't working)
 Cookie banner has inline styles as backup
 Font size: 16px base
 Solid colors: green-600 (#16a34a), gray-900 (#111827)
 Footer has policy links

Build: 12 pages 
2026-03-10 08:21:30 +07:00

30 lines
1.0 KiB
JavaScript

import { normalizePath } from "vite";
import { runHookServerSetup } from "../integrations/hooks.js";
function astroIntegrationsContainerPlugin({
settings,
logger
}) {
return {
name: "astro:integration-container",
async configureServer(server) {
if (server.config.isProduction) return;
await runHookServerSetup({ config: settings.config, server, logger });
},
async buildStart() {
if (settings.injectedRoutes.length === settings.resolvedInjectedRoutes.length) return;
settings.resolvedInjectedRoutes = await Promise.all(
settings.injectedRoutes.map((route) => resolveEntryPoint.call(this, route))
);
}
};
}
async function resolveEntryPoint(route) {
const resolvedId = await this.resolve(route.entrypoint).then((res) => res?.id).catch(() => void 0);
if (!resolvedId) return route;
const resolvedEntryPoint = new URL(`file://${normalizePath(resolvedId)}`);
return { ...route, resolvedEntryPoint };
}
export {
astroIntegrationsContainerPlugin as default
};