{"action":"created","issue":{"url":"https://api.github.com/repos/atom/electron/issues/254","repository_url":"https://api.github.com/repos/atom/electron","labels_url":"https://api.github.com/repos/atom/electron/issues/254/labels{/name}","comments_url":"https://api.github.com/repos/atom/electron/issues/254/comments","events_url":"https://api.github.com/repos/atom/electron/issues/254/events","html_url":"https://github.com/atom/electron/issues/254","id":32924391,"number":254,"title":"jQuery isn't set globally because \"module\" is defined","user":{"login":"luto","id":2158203,"avatar_url":"https://avatars.githubusercontent.com/u/2158203?v=3","gravatar_id":"","url":"https://api.github.com/users/luto","html_url":"https://github.com/luto","followers_url":"https://api.github.com/users/luto/followers","following_url":"https://api.github.com/users/luto/following{/other_user}","gists_url":"https://api.github.com/users/luto/gists{/gist_id}","starred_url":"https://api.github.com/users/luto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luto/subscriptions","organizations_url":"https://api.github.com/users/luto/orgs","repos_url":"https://api.github.com/users/luto/repos","events_url":"https://api.github.com/users/luto/events{/privacy}","received_events_url":"https://api.github.com/users/luto/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":45,"created_at":"2014-05-06T19:26:04Z","updated_at":"2016-02-21T21:25:47Z","closed_at":"2014-05-07T02:44:38Z","body":"jQuery contains something along this lines:\r\n```javascript\r\nif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\r\n  // set jQuery in `module`\r\n} else {\r\n  // set jQuery in `window`\r\n}\r\n```\r\nmodule is defined, even in the browser-side scripts. This causes jQuery to ignore the `window` object and use `module`, so the other scripts won't find `$` nor `jQuery` in global scope..\r\n\r\nI am not sure if this is a jQuery or atom-shell bug, but I wanted to put this on the web, so others won't search as long as I did."},"comment":{"url":"https://api.github.com/repos/atom/electron/issues/comments/186922315","html_url":"https://github.com/atom/electron/issues/254#issuecomment-186922315","issue_url":"https://api.github.com/repos/atom/electron/issues/254","id":186922315,"user":{"login":"gnail","id":2926078,"avatar_url":"https://avatars.githubusercontent.com/u/2926078?v=3","gravatar_id":"","url":"https://api.github.com/users/gnail","html_url":"https://github.com/gnail","followers_url":"https://api.github.com/users/gnail/followers","following_url":"https://api.github.com/users/gnail/following{/other_user}","gists_url":"https://api.github.com/users/gnail/gists{/gist_id}","starred_url":"https://api.github.com/users/gnail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnail/subscriptions","organizations_url":"https://api.github.com/users/gnail/orgs","repos_url":"https://api.github.com/users/gnail/repos","events_url":"https://api.github.com/users/gnail/events{/privacy}","received_events_url":"https://api.github.com/users/gnail/received_events","type":"User","site_admin":false},"created_at":"2016-02-21T21:25:47Z","updated_at":"2016-02-21T21:25:47Z","body":"In Electron 0.36.7 I find that I cannot do a simple `window.$ = require('jquery');` as it'd fail to find the module. I have to do `window.$ = require('electron').remote.require('jquery');' to do it in the main process. The renderer doesn't seem to have the same module resolution path as the main process"}}