{"action":"created","issue":{"url":"https://api.github.com/repos/atom/electron/issues/2120","labels_url":"https://api.github.com/repos/atom/electron/issues/2120/labels{/name}","comments_url":"https://api.github.com/repos/atom/electron/issues/2120/comments","events_url":"https://api.github.com/repos/atom/electron/issues/2120/events","html_url":"https://github.com/atom/electron/issues/2120","id":93013892,"number":2120,"title":"Handling module paths?","user":{"login":"grofit","id":927201,"avatar_url":"https://avatars.githubusercontent.com/u/927201?v=3","gravatar_id":"","url":"https://api.github.com/users/grofit","html_url":"https://github.com/grofit","followers_url":"https://api.github.com/users/grofit/followers","following_url":"https://api.github.com/users/grofit/following{/other_user}","gists_url":"https://api.github.com/users/grofit/gists{/gist_id}","starred_url":"https://api.github.com/users/grofit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grofit/subscriptions","organizations_url":"https://api.github.com/users/grofit/orgs","repos_url":"https://api.github.com/users/grofit/repos","events_url":"https://api.github.com/users/grofit/events{/privacy}","received_events_url":"https://api.github.com/users/grofit/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-04T13:48:52Z","updated_at":"2015-07-05T03:26:22Z","closed_at":null,"body":"I posted this on Slack but got no response so just wanted to post in here.\r\n\r\nHey so I am fairly new to electron and I was wondering how I can set the base path for modules\r\n\r\ngrofit [9:46 AM]\r\nas I was trying to bundle stuff, but that blows up because although lots of stuff is in the bundle when other modules need to reference stuff (as the module magic dance picks common JS not normal global scope) it falls over as it cannot find the module\r\n\r\ngrofit [9:47 AM]\r\nI thought maybe it just embeds requirejs so I tried setting the require config path but it tells me require.config is not a function\r\n\r\ngrofit [9:47 AM]\r\nso is there some *best practice* way to deal with lots of dependencies? and/or bundling"},"comment":{"url":"https://api.github.com/repos/atom/electron/issues/comments/118574199","html_url":"https://github.com/atom/electron/issues/2120#issuecomment-118574199","issue_url":"https://api.github.com/repos/atom/electron/issues/2120","id":118574199,"user":{"login":"steelbrain","id":4278113,"avatar_url":"https://avatars.githubusercontent.com/u/4278113?v=3","gravatar_id":"","url":"https://api.github.com/users/steelbrain","html_url":"https://github.com/steelbrain","followers_url":"https://api.github.com/users/steelbrain/followers","following_url":"https://api.github.com/users/steelbrain/following{/other_user}","gists_url":"https://api.github.com/users/steelbrain/gists{/gist_id}","starred_url":"https://api.github.com/users/steelbrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steelbrain/subscriptions","organizations_url":"https://api.github.com/users/steelbrain/orgs","repos_url":"https://api.github.com/users/steelbrain/repos","events_url":"https://api.github.com/users/steelbrain/events{/privacy}","received_events_url":"https://api.github.com/users/steelbrain/received_events","type":"User","site_admin":false},"created_at":"2015-07-05T03:26:22Z","updated_at":"2015-07-05T03:26:22Z","body":"@grofit the way I handle it is requiring all the nodejs deps and then setting them to window\r\n```\r\n<script>\r\nwindow.request = require('request')\r\n</script>\r\n```\r\nand then add my own app's scripts like normal script tags and use nodejs in them\r\n```\r\n<script src=\"assets/js/main.js\"></script>\r\n```\r\n"}}