[LayaAirIDE 2.0]Laya打包微信小游戏的时候,引入的外部js访问不到
在编译之后的bin文件夹下的index.html文件增加了js引用,如下
打包之后,发生的bug如下:
math is not defined
ReferenceError: math is not defined
at http://127.0.0.1:19768/game/code.js:60:1
at require (http://127.0.0.1:19768/game/__ ... :78871)
at http://127.0.0.1:19768/game/__ ... 78480
at http://127.0.0.1:19768/game/game.js:4:1
at require (http://127.0.0.1:19768/game/__ ... :78871)
at <anonymous>:1:1
<!--导入math.js包-->
<script type="text/javascript" src='math.min.js'></script>
<!--导入自定义计算工具包-->
<script type="text/javascript" src='math.self.js'></script>
打包之后,发生的bug如下:
math is not defined
ReferenceError: math is not defined
at http://127.0.0.1:19768/game/code.js:60:1
at require (http://127.0.0.1:19768/game/__ ... :78871)
at http://127.0.0.1:19768/game/__ ... 78480
at http://127.0.0.1:19768/game/game.js:4:1
at require (http://127.0.0.1:19768/game/__ ... :78871)
at <anonymous>:1:1
要回复问题请先登录
3 个回复
chen
赞同来自:
StevenMiao
赞同来自:
chen
赞同来自: