Chaplin 使用官方的2D项目发布为微信小游戏后,扫码预览和真机调试,在game.js中都会报错:gameThirdScriptErrorUncaught ReferenceError: window is not definedReferenceError: window is not definedat https://servicewechat.qq.com/game.js:63771:12at require (:3:7977)at https://servicewechat.qq.com/game.js:63777:10 请问如何解决?官方的DEMO都有问题吗?
Chaplin 在game.js开头加入var window = window || global;var document = document || (window.document = {});然后报这个错了,index.js都无法载入。