arco-design / arco-design-mobile

React mobile UI components library based on Arco Design
https://arco.design/mobile/react/arco-design/pc/#/
MIT License
402 stars 77 forks source link

error while start with yarn start @babel/runtime/helpers/extends #256

Closed hunter-xue closed 5 months ago

hunter-xue commented 5 months ago

Basic Info

Steps to reproduce

yarn start after install

hunter-xue commented 5 months ago

resolved by install babel/runtime.

TinaPeach commented 5 months ago

这个问题是因为我们在打包时用babel做了polyfill,引入了@babel/runtime这个依赖,在peerDependencies的react-transition-group中会间接引入这个依赖,但如果用户没有安装react-transition-group,且项目用vite编译(不依赖babel)时,就会报错了。arco的最终打包产物也是依赖@babel/runtime的,应该把它放进 dependencies 里而不是让用户自己安装更合理,我们改下发个包哈~

TinaPeach commented 5 months ago

@arco-design/mobile-react@2.31.2 已修复,MR https://github.com/arco-design/arco-design-mobile/pull/257