diff --git a/crates/turbopack-dev/src/ecmascript/content.rs b/crates/turbopack-dev/src/ecmascript/content.rs index eb0f6a1f933bb..53c3715e5a417 100644 --- a/crates/turbopack-dev/src/ecmascript/content.rs +++ b/crates/turbopack-dev/src/ecmascript/content.rs @@ -21,7 +21,7 @@ use super::{ use crate::DevChunkingContext; #[turbo_tasks::value(serialization = "none")] -pub(super) struct EcmascriptDevChunkContent { +pub struct EcmascriptDevChunkContent { pub(super) entries: Vc, pub(super) chunking_context: Vc, pub(super) chunk: Vc, @@ -45,6 +45,13 @@ impl EcmascriptDevChunkContent { } .cell()) } + + #[turbo_tasks::function] + pub async fn entries( + self: Vc, + ) -> Result> { + Ok(self.await?.entries) + } } #[turbo_tasks::value_impl] diff --git a/crates/turbopack-dev/src/ecmascript/mod.rs b/crates/turbopack-dev/src/ecmascript/mod.rs index 0736f16841f95..a819a6d13264e 100644 --- a/crates/turbopack-dev/src/ecmascript/mod.rs +++ b/crates/turbopack-dev/src/ecmascript/mod.rs @@ -6,3 +6,5 @@ pub(crate) mod list; pub(crate) mod merged; pub(crate) mod update; pub(crate) mod version; + +pub use content::EcmascriptDevChunkContent; diff --git a/crates/turbopack-dev/src/lib.rs b/crates/turbopack-dev/src/lib.rs index 6c1317f391fd1..1d77be49b3a84 100644 --- a/crates/turbopack-dev/src/lib.rs +++ b/crates/turbopack-dev/src/lib.rs @@ -4,7 +4,7 @@ #![feature(arbitrary_self_types)] pub(crate) mod chunking_context; -pub(crate) mod ecmascript; +pub mod ecmascript; pub mod react_refresh; pub use chunking_context::{DevChunkingContext, DevChunkingContextBuilder};