mirror of
https://github.com/withastro/astro.git
synced 2025-02-17 22:44:24 -05:00
fix(assets): bundling regression for specific config on non-Node runtimes (#9087)
This commit is contained in:
parent
554017b66a
commit
b895113a0a
2 changed files with 10 additions and 1 deletions
5
.changeset/red-houses-explode.md
Normal file
5
.changeset/red-houses-explode.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Fixes the regression which broke bundling of image service for pre-rendered pages, which was introduced by [#8854](https://github.com/withastro/astro/pull/8854)
|
|
@ -12,7 +12,11 @@ function vitePluginPrerender(opts: StaticBuildOptions, internals: BuildInternals
|
|||
|
||||
outputOptions(outputOptions) {
|
||||
extendManualChunks(outputOptions, {
|
||||
before(id, meta) {
|
||||
after(id, meta) {
|
||||
// Split the Astro runtime into a separate chunk for readability
|
||||
if (id.includes('astro/dist/runtime')) {
|
||||
return 'astro';
|
||||
}
|
||||
const pageInfo = internals.pagesByViteID.get(id);
|
||||
if (pageInfo) {
|
||||
// prerendered pages should be split into their own chunk
|
||||
|
|
Loading…
Add table
Reference in a new issue