[LayaAirIDE 2.0]ide2.6.0beta编译报错:This syntax requires an imported helper but module 'tslib' cannot be found

环境win10 layaboxide 2.6.0 beta
已经全局安装typescript,命令行 tsc -v,输出Version 3.8.3
nodejs 12.16.1
编译报错:
semantic error TS2354: [31mThis syntax requires an imported helper but module 'tslib' cannot be found
 
定位到代码中是:
let { width, height } = Laya.stage; 
mac上却没有问题,win10上却出问题了,求解?难道只支持ts2.x?不支持解析赋值语法?
temp.png
已邀请:

135*****133

赞同来自:

找到临时解决办法,貌似是rollup的问题?
http://ask.layabox.com/question/45491

李康

赞同来自:

tsconfig需要改改,tslib对应自己ide安装路径改一下
{
  "compilerOptions": {
    "module": "es6",
    "target": "es6",
    "noEmitHelpers": false,
    "sourceMap": true,
    "removeComments": true, 
    "baseUrl": ".",
    "paths": {
      "tslib": [
        "D:/Programs/LayaAirIDE/resources/app/node_modules/tslib/tslib.d.ts"
      ]
    }, 
    "lib": [
      "esnext",
      "dom",
      "es2015.promise"
    ]
  }
}

要回复问题请先

商务合作
商务合作