Skip to content

Commit

Permalink
Just introduce a new scope
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Sep 25, 2024
1 parent ed3679d commit 8f4af9d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions turbopack/crates/turbopack-ecmascript/src/chunk/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ impl EcmascriptChunkItemContent {
if this.options.async_module.is_some() {
code += "__turbopack_async_module__(async (__turbopack_handle_async_dependencies__, \
__turbopack_async_result__) => { try {\n";
} else {
code += "{\n";
}

code.push_source(&this.inner_code, this.source_map);
Expand All @@ -152,6 +154,8 @@ impl EcmascriptChunkItemContent {
}}, {});",
opts.has_top_level_await
)?;
} else {
code += "}";
}

code += "})";
Expand Down

0 comments on commit 8f4af9d

Please sign in to comment.