【发布时间】:2017-03-18 19:06:17
【问题描述】:
目前我有这个设置:
// index.js
var example = require('./folder');
和:
// folder/index.js
require('./more');
// folder/test.js
exports.thing = function() {
console.log('test');
return true;
}
但是当我尝试在index.js 中调用example.thing 时,我得到:
example.thing is not a function
有什么方法可以让它工作吗?干杯。
【问题讨论】: