//file.js C = require('./C.js') console.log(typeof C); module.exports = function() { //var c = new C(); return {c: new C()}; } // C.js module.exports = function () { return {val: true}; }