问题描述:新创建的项目 engine 5.2.0 改为es6后编译的时候报 Uncaught Error: #1001: 找不到Egret入口类: Main。 什么都没改

解决方案: 1: 给入口文件添加命名空间 比如: 1 namespace app   2: Main 类 添加 导出 关键字  export class Main extends eui.UILayer  
3:修改 tsconfig.json 文件为:

{
"compilerOptions": {
"target": "es6",
"outDir": "bin-debug",
"experimentalDecorators": true,
"lib": [
"es6",
"dom",
"es2015.promise"
],
"types": []
},
"include": [
"src",
"libs"
]
}

最后: index.html 调整为: data-entry-class="app.Main" 

总结: 这样调整调整  项目 就能编译和 运行 es6 项目了

  

 

 

 

相关文章:

  • 2022-12-23
  • 2021-09-04
  • 2022-02-08
  • 2021-06-10
  • 2021-07-06
  • 2022-12-23
  • 2022-12-23
  • 2022-01-01
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-29
  • 2021-08-01
  • 2021-11-04
相关资源
相似解决方案