ember-fastboot / ember-cli-fastboot

Server-side rendering for Ember.js apps
http://ember-fastboot.com/
MIT License
852 stars 160 forks source link

[queueMicrotask] is missing in fastboot sandbox #936

Open eugenioenko opened 2 months ago

eugenioenko commented 2 months ago

Recently I've upgraded the package @apollo/client to version 3.9.10 in my Ember app and this version is using the global function queueMicrotask which is not available in the default config of fastboot sandbox here:

https://github.com/ember-fastboot/ember-cli-fastboot/blob/1e6ed038608305c6c0c6008e07e302e6a1b5ce16/packages/fastboot/src/sandbox.js#L24

When queueMicrotask is called, fastboot crashes because its is not defined.

I see setTimeout being set, but not queueMicrotask. Would it make sense to add it to the default sandbox?