Skip to content

Commit

Permalink
fix(turbopack): Use module fragment for async module analysis (#71246)
Browse files Browse the repository at this point in the history
### What?

Make `EcmascriptModulePartAsset::is_async_module` specify `ModulePart`
correctly while analyzing

### Why?

The previous code makes all dependencies of a module to be loaded.

### How?
  • Loading branch information
kdy1 authored Oct 14, 2024
1 parent b559c28 commit 157f51e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ impl EcmascriptModulePartAsset {
#[turbo_tasks::function]
pub async fn is_async_module(self: Vc<Self>) -> Result<Vc<bool>> {
let this = self.await?;
let result = this.full_module.analyze();
let result = analyze(this.full_module, this.part);

if let Some(async_module) = *result.await?.async_module.await? {
Ok(async_module.is_self_async(self.references()))
Expand Down

0 comments on commit 157f51e

Please sign in to comment.