Skip to content

Commit

Permalink
expose assets from fallback page (vercel/turborepo#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra authored Oct 25, 2022
1 parent c2bb12d commit 150155b
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use indexmap::{IndexMap, IndexSet};
use turbo_tasks::{primitives::StringVc, ValueToString};
use turbo_tasks_fs::FileSystemPathVc;
use turbopack_core::{
asset::AssetsSetVc,
asset::{Asset, AssetsSetVc},
introspect::{
asset::IntrospectableAssetVc, Introspectable, IntrospectableChildrenVc, IntrospectableVc,
},
Expand Down Expand Up @@ -99,6 +99,15 @@ impl GetContentSource for NodeRenderContentSource {
async fn content_source(&self) -> Result<ContentSourceVc> {
let entries = self.entry.entries();
let mut set = IndexSet::new();
for reference in self.fallback_page.references().await?.iter() {
set.extend(
reference
.resolve_reference()
.primary_assets()
.await?
.copied(),
)
}
for &entry in entries.await?.iter() {
let entry = entry.await?;
set.extend(
Expand Down

0 comments on commit 150155b

Please sign in to comment.