编译 ES6 的工具是一样的,在 weex 项目中则报错。尝试过各种解决方案都失败了。
最简单的试验代码
async function f() {
return 'hello world';
}
f().then(v => console.log(v))
Uncaught TypeError: Cannot assign to read only property 'constructor' of object '#<Object>'
at eval (runtime.js:106)
at Object.eval (runtime.js:716)
at eval (runtime.js:725)
at Object.845 (index.js:1079)
at __webpack_require__ (index.js:22)
at Object.eval (runtime-module.js:19)
at eval (runtime-module.js:33)
at Object.844 (index.js:1072)
at __webpack_require__ (index.js:22)
at eval (index.js:1)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…