{"action":"created","issue":{"url":"https://api.github.com/repos/webpack/webpack/issues/1524","labels_url":"https://api.github.com/repos/webpack/webpack/issues/1524/labels{/name}","comments_url":"https://api.github.com/repos/webpack/webpack/issues/1524/comments","events_url":"https://api.github.com/repos/webpack/webpack/issues/1524/events","html_url":"https://github.com/webpack/webpack/issues/1524","id":112148042,"number":1524,"title":"mongoose.connect undefined is not a function","user":{"login":"stevenlee001","id":6789741,"avatar_url":"https://avatars.githubusercontent.com/u/6789741?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenlee001","html_url":"https://github.com/stevenlee001","followers_url":"https://api.github.com/users/stevenlee001/followers","following_url":"https://api.github.com/users/stevenlee001/following{/other_user}","gists_url":"https://api.github.com/users/stevenlee001/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenlee001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenlee001/subscriptions","organizations_url":"https://api.github.com/users/stevenlee001/orgs","repos_url":"https://api.github.com/users/stevenlee001/repos","events_url":"https://api.github.com/users/stevenlee001/events{/privacy}","received_events_url":"https://api.github.com/users/stevenlee001/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-19T13:47:41Z","updated_at":"2015-10-28T15:20:50Z","closed_at":null,"body":"I got exactly same issue as the question on the stack overflow here:\r\n\r\nhttp://stackoverflow.com/questions/29506814/mongoose-connect-undefined-is-not-a-function\r\n\r\nalso\r\nI got mongoose.model as undefined .  but the same code works fine without webpack.\r\n\r\nI want to confirm this is a issue of webpack or mongoose, I use latest version mongoose 4.1.11"},"comment":{"url":"https://api.github.com/repos/webpack/webpack/issues/comments/151879465","html_url":"https://github.com/webpack/webpack/issues/1524#issuecomment-151879465","issue_url":"https://api.github.com/repos/webpack/webpack/issues/1524","id":151879465,"user":{"login":"aackerman","id":786640,"avatar_url":"https://avatars.githubusercontent.com/u/786640?v=3","gravatar_id":"","url":"https://api.github.com/users/aackerman","html_url":"https://github.com/aackerman","followers_url":"https://api.github.com/users/aackerman/followers","following_url":"https://api.github.com/users/aackerman/following{/other_user}","gists_url":"https://api.github.com/users/aackerman/gists{/gist_id}","starred_url":"https://api.github.com/users/aackerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aackerman/subscriptions","organizations_url":"https://api.github.com/users/aackerman/orgs","repos_url":"https://api.github.com/users/aackerman/repos","events_url":"https://api.github.com/users/aackerman/events{/privacy}","received_events_url":"https://api.github.com/users/aackerman/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T15:20:50Z","updated_at":"2015-10-28T15:20:50Z","body":"You probably want to use [`target: 'node'`](https://webpack.github.io/docs/configuration.html#target)."}}