{"action":"created","issue":{"url":"https://api.github.com/repos/meteor/meteor/issues/6907","repository_url":"https://api.github.com/repos/meteor/meteor","labels_url":"https://api.github.com/repos/meteor/meteor/issues/6907/labels{/name}","comments_url":"https://api.github.com/repos/meteor/meteor/issues/6907/comments","events_url":"https://api.github.com/repos/meteor/meteor/issues/6907/events","html_url":"https://github.com/meteor/meteor/issues/6907","id":151076886,"number":6907,"title":"Proper import chain for Meteor packages","user":{"login":"gadicc","id":381978,"avatar_url":"https://avatars.githubusercontent.com/u/381978?v=3","gravatar_id":"","url":"https://api.github.com/users/gadicc","html_url":"https://github.com/gadicc","followers_url":"https://api.github.com/users/gadicc/followers","following_url":"https://api.github.com/users/gadicc/following{/other_user}","gists_url":"https://api.github.com/users/gadicc/gists{/gist_id}","starred_url":"https://api.github.com/users/gadicc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gadicc/subscriptions","organizations_url":"https://api.github.com/users/gadicc/orgs","repos_url":"https://api.github.com/users/gadicc/repos","events_url":"https://api.github.com/users/gadicc/events{/privacy}","received_events_url":"https://api.github.com/users/gadicc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-26T08:45:13Z","updated_at":"2016-05-28T09:56:18Z","closed_at":null,"body":"In [modules/install-packages.js](https://github.com/meteor/meteor/blob/83c2f7a790dbf13f45a153ed5320f4692e706b41/packages/modules/install-packages.js) we have:\r\n\r\n```js\r\n  meteorDir[name + \".js\"] = function (r, e, module) {\r\n    module.exports = Package[name];\r\n  };\r\n```\r\n\r\nWould it be possible to get something like this instead:\r\n```js\r\n  meteorDir[name + \".js\"] = [mainModule, function(require, e, module) {\r\n    module.exports = require(mainModule);\r\n  }];\r\n```\r\n\r\nThis is important for hotloading for updates to flow down correctly, and required for the new version of the original react-hot-loader package (although there is a [workaround](https://github.com/gaearon/react-hot-loader/issues/259) that can be used to catch the update in each individual package too).  And I guess affects possible bundle analysis in the future.\r\n\r\ncc: @benjamn as usual :)\r\n\r\nI'd say if you tell me that the name of the `mainModule` is already available in `computeJsOutputFilesMap` somewhere I'll submit a PR for this, except I already owe you a much simpler PR from like two weeks ago :("},"comment":{"url":"https://api.github.com/repos/meteor/meteor/issues/comments/222300397","html_url":"https://github.com/meteor/meteor/issues/6907#issuecomment-222300397","issue_url":"https://api.github.com/repos/meteor/meteor/issues/6907","id":222300397,"user":{"login":"abernix","id":841294,"avatar_url":"https://avatars.githubusercontent.com/u/841294?v=3","gravatar_id":"","url":"https://api.github.com/users/abernix","html_url":"https://github.com/abernix","followers_url":"https://api.github.com/users/abernix/followers","following_url":"https://api.github.com/users/abernix/following{/other_user}","gists_url":"https://api.github.com/users/abernix/gists{/gist_id}","starred_url":"https://api.github.com/users/abernix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abernix/subscriptions","organizations_url":"https://api.github.com/users/abernix/orgs","repos_url":"https://api.github.com/users/abernix/repos","events_url":"https://api.github.com/users/abernix/events{/privacy}","received_events_url":"https://api.github.com/users/abernix/received_events","type":"User","site_admin":false},"created_at":"2016-05-28T09:56:18Z","updated_at":"2016-05-28T09:56:18Z","body":"Let's actually leave it open until resolved, per policy for FRs. :wink:"}}
{"actor":{"display_login":"abernix"}}