Skip to content

Commit

Permalink
Merge 575a119 into 9eceb51
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Aug 23, 2023
2 parents 9eceb51 + 575a119 commit cce200d
Show file tree
Hide file tree
Showing 42 changed files with 92 additions and 81 deletions.
4 changes: 4 additions & 0 deletions crates/turbopack-dev/src/chunking_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,14 @@ impl DevChunkingContext {
fn generate_chunk_list_register_chunk(
self: Vc<Self>,
entry_chunk: Vc<Box<dyn Chunk>>,
evaluatable_assets: Vc<EvaluatableAssets>,
other_chunks: Vc<OutputAssets>,
source: Value<EcmascriptDevChunkListSource>,
) -> Vc<Box<dyn OutputAsset>> {
Vc::upcast(EcmascriptDevChunkList::new(
self,
entry_chunk,
evaluatable_assets,
other_chunks,
source,
))
Expand Down Expand Up @@ -324,6 +326,7 @@ impl ChunkingContext for DevChunkingContext {

assets.push(self.generate_chunk_list_register_chunk(
entry_chunk,
EvaluatableAssets::empty(),
Vc::cell(assets.clone()),
Value::new(EcmascriptDevChunkListSource::Dynamic),
));
Expand Down Expand Up @@ -370,6 +373,7 @@ impl ChunkingContext for DevChunkingContext {

assets.push(self.generate_chunk_list_register_chunk(
entry_chunk,
evaluatable_assets,
other_assets,
Value::new(EcmascriptDevChunkListSource::Entry),
));
Expand Down
9 changes: 8 additions & 1 deletion crates/turbopack-dev/src/ecmascript/list/asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ use serde::Serialize;
use turbo_tasks::{Value, ValueToString, Vc};
use turbopack_core::{
asset::{Asset, AssetContent},
chunk::{Chunk, ChunkingContext},
chunk::{Chunk, ChunkingContext, EvaluatableAssets},
ident::AssetIdent,
module::Module,
output::{OutputAsset, OutputAssets},
version::VersionedContent,
};
Expand All @@ -27,6 +28,7 @@ use crate::DevChunkingContext;
pub(crate) struct EcmascriptDevChunkList {
pub(super) chunking_context: Vc<DevChunkingContext>,
pub(super) entry_chunk: Vc<Box<dyn Chunk>>,
pub(super) evaluatable_assets: Vc<EvaluatableAssets>,
pub(super) chunks: Vc<OutputAssets>,
pub(super) source: EcmascriptDevChunkListSource,
}
Expand All @@ -38,12 +40,14 @@ impl EcmascriptDevChunkList {
pub fn new(
chunking_context: Vc<DevChunkingContext>,
entry_chunk: Vc<Box<dyn Chunk>>,
evaluatable_assets: Vc<EvaluatableAssets>,
chunks: Vc<OutputAssets>,
source: Value<EcmascriptDevChunkListSource>,
) -> Vc<Self> {
EcmascriptDevChunkList {
chunking_context,
entry_chunk,
evaluatable_assets,
chunks,
source: source.into_value(),
}
Expand Down Expand Up @@ -79,6 +83,9 @@ impl OutputAsset for EcmascriptDevChunkList {
#[turbo_tasks::function]
async fn ident(&self) -> Result<Vc<AssetIdent>> {
let mut ident = self.entry_chunk.ident().await?.clone_value();
for evaluatable_asset in self.evaluatable_assets.await?.iter() {
ident.add_asset(Vc::<String>::empty(), evaluatable_asset.ident());
}

ident.add_modifier(modifier());

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit cce200d

Please sign in to comment.