Commit 82addcbf authored by Niklas Mischkulnig's avatar Niklas Mischkulnig

Remove unused chunk group

parent ed1db36c
...@@ -65,12 +65,10 @@ use turbopack_core::{ ...@@ -65,12 +65,10 @@ use turbopack_core::{
}, },
output::{OutputAsset, OutputAssets}, output::{OutputAsset, OutputAssets},
raw_output::RawOutput, raw_output::RawOutput,
reference_type::{CommonJsReferenceSubType, CssReferenceSubType, ReferenceType}, reference_type::{CssReferenceSubType, ReferenceType},
resolve::{origin::PlainResolveOrigin, parse::Request, pattern::Pattern},
source::Source, source::Source,
virtual_output::VirtualOutputAsset, virtual_output::VirtualOutputAsset,
}; };
use turbopack_ecmascript::resolve::cjs_resolve;
use crate::{ use crate::{
dynamic_imports::{NextDynamicChunkAvailability, collect_next_dynamic_chunks}, dynamic_imports::{NextDynamicChunkAvailability, collect_next_dynamic_chunks},
...@@ -819,31 +817,6 @@ impl AppProject { ...@@ -819,31 +817,6 @@ impl AppProject {
)) ))
} }
#[turbo_tasks::function]
pub async fn client_main_module(self: Vc<Self>) -> Result<Vc<Box<dyn Module>>> {
let client_module_context = Vc::upcast(self.client_module_context());
let client_main_module = cjs_resolve(
Vc::upcast(PlainResolveOrigin::new(
client_module_context,
self.project().project_path().await?.join("_")?,
)),
Request::parse(Pattern::Constant(rcstr!(
"next/dist/client/app-next-turbopack.js"
))),
CommonJsReferenceSubType::Undefined,
None,
false,
)
.resolve()
.await?
.first_module()
.await?
.context("expected Next.js client runtime to resolve to a module")?;
Ok(*client_main_module)
}
#[turbo_tasks::function] #[turbo_tasks::function]
pub async fn app_module_graphs( pub async fn app_module_graphs(
&self, &self,
......
...@@ -896,14 +896,13 @@ impl Project { ...@@ -896,14 +896,13 @@ impl Project {
#[turbo_tasks::function] #[turbo_tasks::function]
pub async fn get_all_entries(self: Vc<Self>) -> Result<Vc<GraphEntries>> { pub async fn get_all_entries(self: Vc<Self>) -> Result<Vc<GraphEntries>> {
let mut modules = self let modules = self
.get_all_endpoints(false) .get_all_endpoints(false)
.await? .await?
.iter() .iter()
.map(async |endpoint| Ok(endpoint.entries().owned().await?)) .map(async |endpoint| Ok(endpoint.entries().owned().await?))
.try_flat_join() .try_flat_join()
.await?; .await?;
modules.extend(self.client_main_modules().await?.iter().cloned());
Ok(Vc::cell(modules)) Ok(Vc::cell(modules))
} }
...@@ -1728,22 +1727,6 @@ impl Project { ...@@ -1728,22 +1727,6 @@ impl Project {
Ok(any_output_changed(roots, path, false)) Ok(any_output_changed(roots, path, false))
} }
#[turbo_tasks::function]
pub async fn client_main_modules(self: Vc<Self>) -> Result<Vc<GraphEntries>> {
let pages_project = self.pages_project();
let mut modules = vec![ChunkGroupEntry::Entry(vec![
pages_project.client_main_module().to_resolved().await?,
])];
if let Some(app_project) = *self.app_project().await? {
modules.push(ChunkGroupEntry::Entry(vec![
app_project.client_main_module().to_resolved().await?,
]));
}
Ok(Vc::cell(modules))
}
/// Gets the module id strategy for the project. /// Gets the module id strategy for the project.
#[turbo_tasks::function] #[turbo_tasks::function]
pub async fn module_ids(self: Vc<Self>) -> Result<Vc<Box<dyn ModuleIdStrategy>>> { pub async fn module_ids(self: Vc<Self>) -> Result<Vc<Box<dyn ModuleIdStrategy>>> {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment