disable async-to-functin-generator in configuration #3296
-
Can the async to function generation process can be disabled in configuration? I wish to maintain (async () => {}); as it is, without having all of the import regeneratorRuntime from "regenerator-runtime";
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
. . .
} code added at all. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
This is same as #2788. We don't have explicit way to opt out specific transforms, in opposite as a workaround you can target higher level then add other transforms as needed. |
Beta Was this translation helpful? Give feedback.
-
I think I solved it using your suggestion. let _gen = comp.process_js(
&handler,
_trns,
&Options{
config: Config{
jsc: JscConfig {
target: Some(EsVersion::Es2022),
..Default::default()
},
minify: false,
..Default::default()
},
is_module: IsModule::Bool(true),
..Default::default()
}
).unwrap(); My issue was that I had the 2022 target in the |
Beta Was this translation helpful? Give feedback.
This is same as #2788. We don't have explicit way to opt out specific transforms, in opposite as a workaround you can target higher level then add other transforms as needed.