[LayaAirIDE 2.0]Laya打包微信小游戏的时候,引入的外部js访问不到

在编译之后的bin文件夹下的index.html文件增加了js引用,如下
<!--导入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
 
js.png 发布.png 微信BUG.png
已邀请:

chen

赞同来自:

LayaAir IDE 1.8.0.1 beta 版本,1.0的。类库:1.8.0beta

StevenMiao

赞同来自:

你好,我也遇到了一样的问题,请问解决了么?

chen

赞同来自:

对啊,加几行代码就行

要回复问题请先

商务合作
商务合作