blank project

This commit is contained in:
root
2025-10-17 20:17:33 +00:00
commit 14b2d53e8e
9366 changed files with 1515019 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
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.toString()).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
};