[LayaAir 2.0]升级到2.2.0Beta报错Uncaught TypeError: Class constructor Sprite cannot be invoked without 'new'

将tsconfig.json里的"target":"es6"改为"es5"会报错:
Uncaught TypeError: Class constructor Sprite cannot be invoked without 'new'
 
会升级到2.2.0Beta主要是看升级日志里,这个版本修复里很多bug,比如之前我们也发现的异形mask会导致显存增加。
但是我们希望ts编译后的target还是es5.

应该如何操作?还是要修改什么配置?
已邀请:

158*****196

赞同来自:

看了下代码,2.2.0Beta里laya的代码改为用es6的class来实现。
所以Laya是打算从2.2.0这个版本开始不再考虑那些不支持es6的运行环境了?

kylin9718

赞同来自:

2.2.0开始,我们的引擎源码全面转入typescript
打包类库,全面转入es6

要回复问题请先

商务合作
商务合作