Unverified Commit 95490329 authored by Niklas Mischkulnig's avatar Niklas Mischkulnig Committed by GitHub

Turbopack: conditional parse in apply_module_type (#77191)

This probably doesn't have any measurable effect as we always end up parsing anyway, but it might make a difference for NFT entries.
parent 152e54a1
......@@ -158,7 +158,6 @@ async fn apply_module_type(
}
}
let parsed = module.parse();
let options = options.await?;
match options.tree_shaking_mode {
Some(TreeShakingMode::ModuleFragments) => {
......@@ -168,6 +167,7 @@ async fn apply_module_type(
))
}
Some(TreeShakingMode::ReexportsOnly) => {
let parsed = module.parse();
if let Some(part) = part {
match part {
ModulePart::Evaluation => {
......
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