mirror of
https://github.com/withastro/astro.git
synced 2025-04-07 23:41:43 -05:00
replaced object.entries(allpages)
This commit is contained in:
parent
284ee9efe4
commit
d42376c828
2 changed files with 6 additions and 6 deletions
|
@ -248,8 +248,8 @@ export function* eachPageData(internals: BuildInternals) {
|
|||
}
|
||||
|
||||
export function* eachPageFromAllPages(allPages: AllPagesData): Generator<[string, PageBuildData]> {
|
||||
for (const [path, pageData] of Object.entries(allPages)) {
|
||||
yield [path, pageData];
|
||||
for (const pageData of Object.values(allPages)) {
|
||||
yield [pageData.component, pageData];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,12 +51,12 @@ export async function viteBuild(opts: StaticBuildOptions) {
|
|||
// Build internals needed by the CSS plugin
|
||||
const internals = createBuildInternals();
|
||||
|
||||
for (const [component, pageData] of Object.entries(allPages)) {
|
||||
const astroModuleURL = new URL('./' + component, settings.config.root);
|
||||
const astroModuleId = prependForwardSlash(component);
|
||||
for (const pageData of Object.values(allPages)) {
|
||||
const astroModuleURL = new URL('./' + pageData.component, settings.config.root);
|
||||
const astroModuleId = prependForwardSlash(pageData.component);
|
||||
|
||||
// Track the page data in internals
|
||||
trackPageData(internals, component, pageData, astroModuleId, astroModuleURL);
|
||||
trackPageData(internals, pageData.component, pageData, astroModuleId, astroModuleURL);
|
||||
|
||||
if (!routeIsRedirect(pageData.route)) {
|
||||
pageInput.add(astroModuleId);
|
||||
|
|
Loading…
Add table
Reference in a new issue