A bug with inline requires and experimental import support where wrapping export const ghQueueMicrotask = queueMicrotask;
throws a TypeError: Illegal invocation
when invoked from an external module—only on web.
If inline requires, or experimental import support are removed, the error does not occur.
- Clone this repo
- Run
npx expo install
- Run
npx expo start --web
I'd imagine that the issue is related to the scope binding. In tsc
for example, the inline would have the null binding treatment, e.g. (0, ghQueueMicrotask)()
. If you manually add this to the example, then it works as expected. Perhaps this needs to be added to the Metro inline requires plugin.