use rspack_collections::IdentifierMap;
use rustc_hash::FxHashMap as HashMap;
use crate::{AsyncDependenciesBlockIdentifierMap, ChunkGroupUkey, ChunkUkey, ModuleIdentifier};
pub mod chunk_graph_chunk;
pub mod chunk_graph_module;
pub use chunk_graph_chunk::{ChunkGraphChunk, ChunkIdMap, ChunkSizeOptions, IndexChunkIdMap};
pub use chunk_graph_module::{ChunkGraphModule, ModuleId, ModuleIdMap};
#[derive(Debug, Clone, Default)]
pub struct ChunkGraph {
pub(crate) block_to_chunk_group_ukey: AsyncDependenciesBlockIdentifierMap<ChunkGroupUkey>,
pub(crate) chunk_graph_module_by_module_identifier: IdentifierMap<ChunkGraphModule>,
chunk_graph_chunk_by_chunk_ukey: HashMap<ChunkUkey, ChunkGraphChunk>,
runtime_ids: HashMap<String, Option<String>>,
}
impl ChunkGraph {
pub fn is_entry_module(&self, module_id: &ModuleIdentifier) -> bool {
let cgm = self.expect_chunk_graph_module(*module_id);
!cgm.entry_in_chunks.is_empty()
}
}