Fix order-of-execution bug when generating pages (#5822)
* fix: bundle all pages into a single chunk * chore: add changeset Co-authored-by: Nate Moore <nate@astro.build>
This commit is contained in:
parent
23dc9ea96a
commit
01f3f463bf
2 changed files with 7 additions and 2 deletions
5
.changeset/beige-beds-smile.md
Normal file
5
.changeset/beige-beds-smile.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Fix edge case with bundle generation by emitting a single chunk for pages
|
|
@ -34,8 +34,8 @@ export function vitePluginPrerender(
|
|||
if (api.getModuleInfo(id)?.meta.astro?.pageOptions?.prerender) {
|
||||
return `prerender`;
|
||||
}
|
||||
// pages should go in their own chunks/pages/* directory
|
||||
return `pages${pageInfo.route.route.replace(/\/$/, '/index')}`;
|
||||
// dynamic pages should all go in their own chunk in the pages/* directory
|
||||
return `pages/all`;
|
||||
}
|
||||
};
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue