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