File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
crates/swc_ecma_preset_env/src Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change 5151{
5252 let pass = noop_pass ( ) ;
5353 let mut options = swc_ecma_transformer:: Options :: default ( ) ;
54+ options. unresolved_ctxt = SyntaxContext :: empty ( ) . apply_mark ( unresolved_mark) ;
55+ options. assumptions = assumptions;
5456
5557 macro_rules! add {
5658 ( $prev: expr, $feature: ident, $pass: expr) => { {
@@ -195,16 +197,9 @@ where
195197 ) ;
196198
197199 // ES2017
198- let pass = add ! (
199- pass,
200- AsyncToGenerator ,
201- es2017:: async_to_generator(
202- es2017:: async_to_generator:: Config {
203- ignore_function_length: loose || assumptions. ignore_function_length,
204- } ,
205- unresolved_mark
206- )
207- ) ;
200+ if !caniuse ( Feature :: AsyncToGenerator ) {
201+ options. env . es2017 . async_to_generator = true ;
202+ }
208203
209204 // ES2016
210205 if !caniuse ( Feature :: ExponentiationOperator ) {
You can’t perform that action at this time.
0 commit comments