You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Storybook with React Native. I discovered that after Storybook was imported Promise.prototype.finally became undefined. I hunted the problem down to Storybook performing:
import 'core-js/modules/es.promise';
Before the import Promise.prototype.finally is a function, after the import it is undefined (but other promise functions work as expected). Example repo.
I tried also import 'core-js/features/promise' - this changes Promise.prototype.finally from a JS function to native code function and seems to work.
I am unsure whether this is a bug in core-js or in the way Storybook is using core-js.
The text was updated successfully, but these errors were encountered:
Yes, with the current logic also should be imported core-js/modules/es.promise.finally. /modules/ path not for direct usage - it should be used by entry points like core-js/es/promise or tools like @babel/preset-env and it should inject required modules.
In case someone else hits this, I eventually found Storybook #8371. If I understand it correctly, Storybook includes incorrect polyfills in the RN code due to build issues.
I am using Storybook with React Native. I discovered that after Storybook was imported
Promise.prototype.finally
became undefined. I hunted the problem down to Storybook performing:Before the import
Promise.prototype.finally
is a function, after the import it is undefined (but other promise functions work as expected). Example repo.I tried also
import 'core-js/features/promise'
- this changesPromise.prototype.finally
from a JS function to native code function and seems to work.I am unsure whether this is a bug in core-js or in the way Storybook is using core-js.
The text was updated successfully, but these errors were encountered: