Closed bjoluc closed 6 months ago
Ok, I think that we could accept the second option 👍
BTW Duktape still doesn't support WeakMap
at all? Because it's critical for https://github.com/zloirock/core-js/issues/1301
You're right about WeakMap, sadly. It also looks like that's not going to happen in the foreseeable future. Personally, I'm totally fine with dropping Duktape support in v4 – it is awesome enough that v3 works with Duktape and at some point it feels wasted to keep supporting a rarely used and almost stale legacy engine (I wish it weren't, but so it seems).
I know my environment is fairly edgy and I'm happy to work around it locally, but since I spent quite some time tracking my issue down already, I thought it wouldn't hurt to at least share my results here.
I bundle some pieces of core-js in an esbuild-built project that targets Duktape. Up to core-js 3.30.1, everything was working fine, but the fix for #1231 broke the global object detection in Duktape – here's what happens in the build output:
Running the above code in Node.js correctly prints
object
, while Duktape decides to go forundefined
, i.e. the object exported byglobal.js
is not the global one. Sadly, I'm not involved enough to judge if this is related to https://github.com/evanw/esbuild/issues/1147 or not.The following two patches work for me, but I don't know whether they might break again in Figma (#1231):
Lastly, thanks for your continued work on core-js @zloirock :heart: I hope you'll receive more of the support you deserve in the future :smiling_face_with_tear: