icestark icon indicating copy to clipboard operation
icestark copied to clipboard

error occurs when execute script in sandbox: Error: only one instance of babel-polyfill is allowed

Open hashwing opened this issue 3 years ago • 0 comments

Do you want to request a feature or report a bug? bug

What is the current behavior?

切换两个子应用出现错误error occurs when execute script in sandbox: Error: only one instance of babel-polyfill is allowed

**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

What is the expected behavior?

需要怎么避免

hashwing avatar Jul 29 '22 07:07 hashwing

这个错误是 babel-polyfill 抛出的,需要确保 babel-polyfill 的代码只执行一次,即可以将 babel-polyfill 仅在主应用中执行

ClarkXia avatar Sep 05 '22 04:09 ClarkXia

确实两个子应用都执行 babel-polyfill ,但这个被包含在第三组件无法修改,通过更换组件解决了

hashwing avatar Sep 13 '22 03:09 hashwing