作者:壹路上有祢_522 | 来源:互联网 | 2023-05-18 00:06
Iamhavingissueswiththisgame.jscodethatthegame.tsfilecompilesto:我遇到game.ts文件编译的game.js代
I am having issues with this game.js code that the game.ts file compiles to:
我遇到game.ts文件编译的game.js代码问题:
var GameObjects = require("./GameObjects")
I have set up my page index.html js imports as so:
我已经设置了我的页面index.html js imports,如下所示:
and this is the error in chrome:
这是chrome中的错误:
Uncaught ReferenceError: exports is not defined GameObjects.js:82
Uncaught Error: Module name "GameObjects" has not been loaded yet for context: _. Use require([]) http://requirejs.org/docs/errors.html#notloaded
any ideas friends?
任何想法的朋友?
2 个解决方案