【发布时间】:2018-07-21 17:40:39
【问题描述】:
我在我的项目中安装了包 resource-bundle,现在在我的 main.js 中使用它:
/*main.js*/
var co=require('co');
var loader = require('resource-bundle');
co(function*(){
...
...
}).catch(onerror);
这是在资源包的index.js 中:
/*index.js*/
module.exports = function*(locale, dir, baseName) {
...
...
...
}
它得到这个错误:
Cannot assign to read only property 'exports' of object '#<Object>'
有什么问题?
【问题讨论】:
标签: javascript ecmascript-6 vue.js vuejs2 es6-modules