File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -29,18 +29,18 @@ pub struct Context {
2929
3030struct TransformVisitor {
3131 plugin_config : PluginConfig ,
32- hash : String ,
32+ filename_hash : String ,
3333 local_idents : HashSet < String > ,
3434 variable_count : u32 ,
3535 current_var_declarator : Option < String > ,
3636 current_object_prop_declarator : Option < String > ,
3737}
3838
3939impl TransformVisitor {
40- pub fn new ( plugin_config : PluginConfig , hash : String ) -> Self {
40+ pub fn new ( plugin_config : PluginConfig , filename_hash : String ) -> Self {
4141 Self {
4242 plugin_config,
43- hash ,
43+ filename_hash ,
4444 local_idents : HashSet :: new ( ) ,
4545 variable_count : 0 ,
4646 current_var_declarator : None ,
@@ -128,7 +128,12 @@ impl VisitMut for TransformVisitor {
128128 } ;
129129
130130 // Append hash and counter
131- write ! ( & mut variable_name, "{}{}" , self . hash, self . variable_count) . unwrap ( ) ;
131+ write ! (
132+ & mut variable_name,
133+ "{}{}" ,
134+ self . filename_hash, self . variable_count
135+ )
136+ . unwrap ( ) ;
132137 self . variable_count += 1 ;
133138
134139 call_expr. args . insert (
You can’t perform that action at this time.
0 commit comments