[turbopack] Use updated RawOutput API (#65300)

Use updated API suggested by sokra in review on #65223:

https://github.com/vercel/next.js/pull/65223#discussion_r1587157258

Depends on https://github.com/vercel/turbo/pull/8075
This commit is contained in:
Benjamin Woodruff 2024-05-22 11:10:58 -07:00 committed by GitHub
parent 4ead5fc00d
commit ad8d1c27ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -44,7 +44,7 @@ use turbopack_binding::{
},
turbopack::{
core::{
asset::{Asset, AssetContent},
asset::AssetContent,
chunk::{
availability_info::AvailabilityInfo, ChunkingContext, ChunkingContextExt,
EvaluatableAssets,
@ -52,6 +52,7 @@ use turbopack_binding::{
file_source::FileSource,
module::Module,
output::{OutputAsset, OutputAssets},
raw_output::RawOutput,
source::Source,
virtual_output::VirtualOutputAsset,
},
@ -907,7 +908,7 @@ impl AppEndpoint {
let polyfill_output_path =
client_chunking_context.chunk_path(polyfill_source.ident(), ".js".to_string());
let polyfill_output_asset =
VirtualOutputAsset::new(polyfill_output_path, polyfill_source.content());
RawOutput::new(polyfill_output_path, Vc::upcast(polyfill_source));
let polyfill_client_path = client_relative_path_ref
.get_path_to(&*polyfill_output_path.await?)
.context("failed to resolve client-relative path to polyfill")?