React Native立即崩溃,因为storybook内置了core-js polyfills(TypeError: finally is not a function)

zpqajqem  于 2个月前  发布在  React
关注(0)|答案(1)|浏览(30)

描述bug

Promise.resolve().finally(()=>{})  //  TypeError: Promise.resolve().finally is not a function.

这个bug是由于core-js的polyfill破坏了JS环境(https://reactnative.dev/docs/javascript-environment)导致的。

复现方法

Repo: https://github.com/retyui/storybook-issues-18691

git clone https://github.com/retyui/storybook-issues-18691
cd storybook-issues-18691 
yarn # instal deps
yarn start # run metro bundler

yarn android # open app 
# or `yarn ios`

系统信息

...

附加信息

...

相关问题