File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -17,12 +17,10 @@ impl Case for CompressorRunner {
17
17
18
18
fn driver ( & self ) -> Driver {
19
19
// always compress js files
20
- let mut transform = default_transformer_options ( ) ;
21
-
22
- // The compressor will remove unreachable code and the typescript plugin has a feature to remove unused imports.
23
- // There is a conflict between these two features, so we need to disable the typescript plugin's feature.
24
- transform. typescript . only_remove_type_imports = true ;
25
-
26
- Driver { transform : Some ( transform) , compress : true , ..Driver :: default ( ) }
20
+ Driver {
21
+ transform : Some ( default_transformer_options ( ) ) ,
22
+ compress : true ,
23
+ ..Driver :: default ( )
24
+ }
27
25
}
28
26
}
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ pub fn default_transformer_options() -> TransformOptions {
22
22
. unwrap ( ) ;
23
23
// `object_rest_spread` is not ready
24
24
options. es2018 . object_rest_spread = None ;
25
+ // Enables `only_remove_type_imports` avoiding removing all unused imports
26
+ options. typescript . only_remove_type_imports = true ;
25
27
options
26
28
}
27
29
You can’t perform that action at this time.
0 commit comments