请问,CocosCreator1.6如何引入 google-protobuf.js

我目前在1.5.2版本上是直接npm进去,工程目录下面有node_modules/google-protobuf文件夹
现在打算更新到1.6,我看了教程,直接把google-protobuf.js放到工程下面,然后选择导入为插件。结果在浏览器上错误
Uncaught ReferenceError: exports is not defined
at :7456/res/raw-assets/Script/google-protobuf.js:370

http://forum.cocos.com/t/1-6-npm/49926/10

:joy:从LUA转过来,,不是太懂JS。。我是按你们的教程,把google-protobuf.js文件放到项目里面,如果点击导入插件,编辑器上不会报错,但是在浏览器里面就报Uncaught ReferenceError: exports is not defined
如果不点导入为插件。。就会在编辑器里面报错
failed: load script [D:\CocosProject\Protobuf3316\temp\quick-scripts\assets\Script\google-protobuf.js] failed : TypeError: Cannot read property ‘navigator’ of undefined
at Object.goog.labs.userAgent.util.getNavigator_ (D:\CocosProject\Protobuf3316\temp\quick-scripts\assets\Script\google-protobuf.js:1291:21)
at Object.goog.labs.userAgent.util.getNativeUserAgentString_ (D:\CocosProject\Protobuf3316\temp\quick-scripts\assets\Script\google-protobuf.js:1289:36)
at __define (D:\CocosProject\Protobuf3316\temp\quick-scripts\assets\Script\google-protobuf.js:1292:66)
at D:\CocosProject\Protobuf3316\temp\quick-scripts\assets\Script\google-protobuf.js:3131:13
at Object. (D:\CocosProject\Protobuf3316\temp\quick-scripts\assets\Script\google-protobuf.js:3138:11)
at Module._compile (module.js:556:32)
at Object.Module._extensions…js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)

。。这个是说我导入的google-protobuf.js文件本身就又问题吗?

能帮我看看么~:sweat:

不同的环境的确有区别,这里是应该导入为插件,但是要编译成浏览器中支持的形式,比如用上面链接里面说的 webpack 打包一下。

zjn_028.zip (373.5 KB)
。。我发不了帖子了,在这里问一下吧,,这个是我使用DragonBonesPro制作的一个序列帧动画,播放的时候,显示不出来,但是可以触发事件帧。。在cocosCreator里面也看不到,我编辑了几十个这种动画,有这么几个显示不出来。你那边能帮我测试一下么?