微信小游戏不支持CCC使用state-machine吗?(已解决)

state-machine 版本:3.0.1
state-machine.js 导入工程后设置为插件,
然后在 onLoad 测试,代码如下:

测试结果:
1.浏览器下正常


2.发布到微信小游戏 StateMachine is not defined

你不要弄成插件,直接require进来试试

require可以解决这个问题