chore: cleanup code (#6897)
This commit is contained in:
parent
b6154d2d57
commit
b24607069e
2 changed files with 3 additions and 3 deletions
|
@ -89,7 +89,7 @@ export async function generatePages(opts: StaticBuildOptions, internals: BuildIn
|
|||
const serverEntry = opts.buildConfig.serverEntry;
|
||||
const outFolder = ssr ? opts.buildConfig.server : getOutDirWithinCwd(opts.settings.config.outDir);
|
||||
|
||||
if (opts.settings.config.output === 'server' && !hasPrerenderedPages(internals)) return;
|
||||
if (ssr && !hasPrerenderedPages(internals)) return;
|
||||
|
||||
const verb = ssr ? 'prerendering' : 'generating';
|
||||
info(opts.logging, null, `\n${bgGreen(black(` ${verb} static routes `))}`);
|
||||
|
@ -98,7 +98,7 @@ export async function generatePages(opts: StaticBuildOptions, internals: BuildIn
|
|||
const ssrEntry = await import(ssrEntryURL.toString());
|
||||
const builtPaths = new Set<string>();
|
||||
|
||||
if (opts.settings.config.output === 'server') {
|
||||
if (ssr) {
|
||||
for (const pageData of eachPrerenderedPageData(internals)) {
|
||||
await generatePage(opts, internals, pageData, ssrEntry, builtPaths);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ export function vitePluginSSR(internals: BuildInternals, adapter: AstroAdapter):
|
|||
options(opts) {
|
||||
return addRollupInput(opts, [virtualModuleId]);
|
||||
},
|
||||
resolveId(id, parent) {
|
||||
resolveId(id) {
|
||||
if (id === virtualModuleId) {
|
||||
return resolvedVirtualModuleId;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue