Commit a2d17039 authored by Tobias Koppers's avatar Tobias Koppers

pass ModulePart correctly for FreeVarReference::EcmaScriptModule

parent 61651b2b
......@@ -435,7 +435,6 @@ struct AnalysisState<'a> {
// There can be many references to import.meta, but only the first should hoist
// the object allocation.
first_import_meta: bool,
tree_shaking_mode: Option<TreeShakingMode>,
import_externals: bool,
ignore_dynamic_requests: bool,
url_rewrite_behavior: Option<UrlRewriteBehavior>,
......@@ -964,7 +963,6 @@ pub async fn analyse_ecmascript_module_internal(
fun_args_values: Default::default(),
var_cache: Default::default(),
first_import_meta: true,
tree_shaking_mode: options.tree_shaking_mode,
import_externals: options.import_externals,
ignore_dynamic_requests: options.ignore_dynamic_requests,
url_rewrite_behavior: options.url_rewrite_behavior,
......@@ -2624,12 +2622,7 @@ async fn handle_free_var_reference(
span.hi.to_u32(),
),
Default::default(),
match state.tree_shaking_mode {
Some(
TreeShakingMode::ModuleFragments | TreeShakingMode::ReexportsOnly,
) => export.clone().map(ModulePart::export),
None => None,
},
export.clone().map(ModulePart::export),
state.import_externals,
)
.resolved_cell())
......
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