{"action":"created","issue":{"url":"https://api.github.com/repos/rollup/rollup/issues/1","labels_url":"https://api.github.com/repos/rollup/rollup/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/rollup/rollup/issues/1/comments","events_url":"https://api.github.com/repos/rollup/rollup/issues/1/events","html_url":"https://github.com/rollup/rollup/issues/1","id":81036009,"number":1,"title":"Resolvers and transformers","user":{"login":"Rich-Harris","id":1162160,"avatar_url":"https://avatars.githubusercontent.com/u/1162160?v=3","gravatar_id":"","url":"https://api.github.com/users/Rich-Harris","html_url":"https://github.com/Rich-Harris","followers_url":"https://api.github.com/users/Rich-Harris/followers","following_url":"https://api.github.com/users/Rich-Harris/following{/other_user}","gists_url":"https://api.github.com/users/Rich-Harris/gists{/gist_id}","starred_url":"https://api.github.com/users/Rich-Harris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rich-Harris/subscriptions","organizations_url":"https://api.github.com/users/Rich-Harris/orgs","repos_url":"https://api.github.com/users/Rich-Harris/repos","events_url":"https://api.github.com/users/Rich-Harris/events{/privacy}","received_events_url":"https://api.github.com/users/Rich-Harris/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rollup/rollup/labels/discussion","name":"discussion","color":"5319e7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":21,"created_at":"2015-05-26T16:24:14Z","updated_at":"2015-11-27T18:02:19Z","closed_at":"2015-10-29T03:21:00Z","body":"Rollup needs to be capable of resolving external modules. The obvious scenario is the one in which external modules live in a `node_modules` folder, and (at least in some cases) have a [jsnext:main](https://github.com/rollup/rollup/wiki/jsnext:main) field pointing to an ES6 module. Also, it would be good to support `jspm_packages`.\r\n\r\nBut we might not want to bundle external modules, so it shouldn't necessarily be the default. Maybe it looks like this:\r\n\r\n```bash\r\nrollup -i main.js -o bundle.js --resolve npm jspm\r\n```\r\n\r\n```js\r\nrollup.rollup( 'main.js', {\r\n  resolvePath: [ rollup.npm, rollup.jspm ]\r\n}).then( function ( bundle ) {\r\n  /* ... */\r\n});\r\n```\r\n\r\nThe other factors to consider are a) whether to try and convert legacy formats to ES6 and b) whether to support loader plugins (e.g. `import 'styles.css!'` or `import data from 'data.json!'` or whatever).\r\n\r\nNeed to bear in mind how all this interacts with `transform` steps, caches and so on."},"comment":{"url":"https://api.github.com/repos/rollup/rollup/issues/comments/160183676","html_url":"https://github.com/rollup/rollup/issues/1#issuecomment-160183676","issue_url":"https://api.github.com/repos/rollup/rollup/issues/1","id":160183676,"user":{"login":"Rich-Harris","id":1162160,"avatar_url":"https://avatars.githubusercontent.com/u/1162160?v=3","gravatar_id":"","url":"https://api.github.com/users/Rich-Harris","html_url":"https://github.com/Rich-Harris","followers_url":"https://api.github.com/users/Rich-Harris/followers","following_url":"https://api.github.com/users/Rich-Harris/following{/other_user}","gists_url":"https://api.github.com/users/Rich-Harris/gists{/gist_id}","starred_url":"https://api.github.com/users/Rich-Harris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rich-Harris/subscriptions","organizations_url":"https://api.github.com/users/Rich-Harris/orgs","repos_url":"https://api.github.com/users/Rich-Harris/repos","events_url":"https://api.github.com/users/Rich-Harris/events{/privacy}","received_events_url":"https://api.github.com/users/Rich-Harris/received_events","type":"User","site_admin":false},"created_at":"2015-11-27T18:02:19Z","updated_at":"2015-11-27T18:02:19Z","body":"@jay8t6 it would be a worthwhile addition – personally I don't have a need for it, and have a million other things I need to do first, so I'll defer to anyone else out there who wants to do it! https://github.com/rollup/rollup-plugin-npm ought to be a good place to start from."}}