Fix serving images referenced from app directory (#49236)

### What?

Fixes serving images that are referenced by JS files inside the `/app`
directory.

### Why?

### How?

The `NextImageContentSource` attempts to fetch the image out of it's
inner content source, and before we were only providing it with the
`/public` and `/pages` directory's respective sources.

Re: https://vercel.slack.com/archives/C046HAU4H7F/p1683220799917649
This commit is contained in:
Justin Ridgewell 2023-05-04 15:30:46 -04:00 committed by GitHub
parent 12a6827c5d
commit d24f506e0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -389,10 +389,7 @@ async fn source(
let main_source = main_source.into(); let main_source = main_source.into();
let source_maps = SourceMapContentSourceVc::new(main_source).into(); let source_maps = SourceMapContentSourceVc::new(main_source).into();
let source_map_trace = NextSourceMapTraceContentSourceVc::new(main_source).into(); let source_map_trace = NextSourceMapTraceContentSourceVc::new(main_source).into();
let img_source = NextImageContentSourceVc::new( let img_source = NextImageContentSourceVc::new(main_source).into();
CombinedContentSourceVc::new(vec![static_source, page_source]).into(),
)
.into();
let router_source = NextRouterContentSourceVc::new( let router_source = NextRouterContentSourceVc::new(
main_source, main_source,
execution_context, execution_context,