Open kripod opened 1 month ago
Trying swc in debug mode with env.targets set to browserslist("defaults") and env.bugfixes enabled, I noticed the transform ‘bugfix/transform-safari-id-destructuring-collision-in-function-expression’ being applied.
env.targets
browserslist("defaults")
env.bugfixes
Looking up the corresponding docs of Babel, I figured the following snippet throws a SyntaxError up until Safari 16.2 as per this bug report:
let b = function a({ test: a }) { console.log(a); };
Running esbuild on the code, it appears the project doesn’t apply a fix like Babel or swc does.
Please consider implementing a workaround as applied by Babel:
let b = function a({ test: _a }) { console.log(_a); };
Thank you in advance!
Trying swc in debug mode with
env.targets
set tobrowserslist("defaults")
andenv.bugfixes
enabled, I noticed the transform ‘bugfix/transform-safari-id-destructuring-collision-in-function-expression’ being applied.Looking up the corresponding docs of Babel, I figured the following snippet throws a SyntaxError up until Safari 16.2 as per this bug report:
Running esbuild on the code, it appears the project doesn’t apply a fix like Babel or swc does.
Please consider implementing a workaround as applied by Babel:
Thank you in advance!