{"action":"created","issue":{"url":"https://api.github.com/repos/seajs/seajs/issues/1506","labels_url":"https://api.github.com/repos/seajs/seajs/issues/1506/labels{/name}","comments_url":"https://api.github.com/repos/seajs/seajs/issues/1506/comments","events_url":"https://api.github.com/repos/seajs/seajs/issues/1506/events","html_url":"https://github.com/seajs/seajs/issues/1506","id":75906963,"number":1506,"title":"为什么exports不能放入构造函数","user":{"login":"ioriandy4","id":7553775,"avatar_url":"https://avatars.githubusercontent.com/u/7553775?v=3","gravatar_id":"","url":"https://api.github.com/users/ioriandy4","html_url":"https://github.com/ioriandy4","followers_url":"https://api.github.com/users/ioriandy4/followers","following_url":"https://api.github.com/users/ioriandy4/following{/other_user}","gists_url":"https://api.github.com/users/ioriandy4/gists{/gist_id}","starred_url":"https://api.github.com/users/ioriandy4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ioriandy4/subscriptions","organizations_url":"https://api.github.com/users/ioriandy4/orgs","repos_url":"https://api.github.com/users/ioriandy4/repos","events_url":"https://api.github.com/users/ioriandy4/events{/privacy}","received_events_url":"https://api.github.com/users/ioriandy4/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-13T08:54:45Z","updated_at":"2015-05-13T09:15:53Z","closed_at":null,"body":"如下，a.js  require b.js ,\r\n\r\n-------------a.js代码：------------------------\r\ndefine(function(require,exports,module){\r\n\tvar a=require('export_test/b.js');\r\n\tconsole.log(a);\r\n\ta.sayName(); //报错\r\n})\r\n\r\n------------b.js代码--------------\r\ndefine(function(require,exports,module){\r\n\tfunction c(){\r\n\t\tthis.theName='tom';\r\n\t}\r\n\tc.prototype.sayName=function(){\r\n\t\talert(this.theName);\r\n\t}\r\n\r\n\t//传递c类\r\n\texports.a=c;\r\n})\r\n\r\n在b.js声明了构造函数（大多数插件都是这样的），想传递出去用，在a.js里面用却报错了，请问应该如何写呢"},"comment":{"url":"https://api.github.com/repos/seajs/seajs/issues/comments/101585231","html_url":"https://github.com/seajs/seajs/issues/1506#issuecomment-101585231","issue_url":"https://api.github.com/repos/seajs/seajs/issues/1506","id":101585231,"user":{"login":"afc163","id":507615,"avatar_url":"https://avatars.githubusercontent.com/u/507615?v=3","gravatar_id":"","url":"https://api.github.com/users/afc163","html_url":"https://github.com/afc163","followers_url":"https://api.github.com/users/afc163/followers","following_url":"https://api.github.com/users/afc163/following{/other_user}","gists_url":"https://api.github.com/users/afc163/gists{/gist_id}","starred_url":"https://api.github.com/users/afc163/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afc163/subscriptions","organizations_url":"https://api.github.com/users/afc163/orgs","repos_url":"https://api.github.com/users/afc163/repos","events_url":"https://api.github.com/users/afc163/events{/privacy}","received_events_url":"https://api.github.com/users/afc163/received_events","type":"User","site_admin":false},"created_at":"2015-05-13T09:15:53Z","updated_at":"2015-05-13T09:15:53Z","body":"```js\r\n// ----------------a.js-----------------------\r\ndefine(function(require,exports,module) {\r\n  var A= require('export_test/b.js');\r\n  console.log(A);//空对象\r\n  var a = new A();\r\n  a.sayName();\r\n});\r\n```\r\n\r\n可以补点 JS 关于 prototype 的基础知识。"}}