Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions packages/core/src/start/importManifestAndRenderers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,14 @@ import { getBuildPathsFromInlineConfig } from "@/utils/getBuildPathsFromInlineCo

/**
* Import the manifest and renderers from the Astro build.
*
* HACK: We invalidate import caching for both the manifest and renderers,
* so that tests expecting different manifests do not fail here.
*/
export async function importManifestAndRenderers(
config: AstroInlineConfig,
): Promise<{ manifest: SSRManifest; renderers: SSRLoadedRenderer[] }> {
const { buildServerPath } = getBuildPathsFromInlineConfig(config);

try {
const entryModule = await import(
path.join(buildServerPath, `entry.mjs?invalidateCache=${Math.random()}`)
);
const entryModule = await import(path.join(buildServerPath, "entry.mjs"));
const manifest: SSRManifest = entryModule.manifest;
const renderers: SSRLoadedRenderer[] = manifest.renderers ?? [];
return { manifest, renderers };
Expand Down
Loading