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) => { {
@@ -197,16 +199,9 @@ where
197199 ) ;
198200
199201 // ES2017
200- let pass = add ! (
201- pass,
202- AsyncToGenerator ,
203- es2017:: async_to_generator(
204- es2017:: async_to_generator:: Config {
205- ignore_function_length: loose || assumptions. ignore_function_length,
206- } ,
207- unresolved_mark
208- )
209- ) ;
202+ if !caniuse ( Feature :: AsyncToGenerator ) {
203+ options. env . es2017 . async_to_generator = true ;
204+ }
210205
211206 // ES2016
212207 if !caniuse ( Feature :: ExponentiationOperator ) {
You can’t perform that action at this time.
0 commit comments