ice icon indicating copy to clipboard operation
ice copied to clipboard

babel 编译 node_modules 代码时注入 _createForOfIteratorHelper(),导致在 IE 11 下报错

Open luhc228 opened this issue 2 years ago • 0 comments

build-plugin-ice-i18n runtime 源码中,含有 for...of 语法,会被 babel 注入 @babel/runtime_createForOfIteratorHelper() 方法(里面包含迭代器语法),导致在 IE11 下无法 work。

目前看了下框架的源码,默认情况下是不会引入 @babel/plugin-transform-runtime的,也就不会引入 @babel/runtime,与当前表现不一致,需要进一步调研。

相关的问题: https://stackoverflow.com/questions/62959348/ie11-error-typeerror-non-array-objects-must-have-a-symbol-iterator-method

luhc228 avatar Jul 04 '22 06:07 luhc228