{"action":"created","issue":{"url":"https://api.github.com/repos/webpack/webpack/issues/138","labels_url":"https://api.github.com/repos/webpack/webpack/issues/138/labels{/name}","comments_url":"https://api.github.com/repos/webpack/webpack/issues/138/comments","events_url":"https://api.github.com/repos/webpack/webpack/issues/138/events","html_url":"https://github.com/webpack/webpack/issues/138","id":24790864,"number":138,"title":"Problem with amd modules: \"define cannot be used indirect\"","user":{"login":"jhnns","id":781746,"avatar_url":"https://avatars.githubusercontent.com/u/781746?v=3","gravatar_id":"","url":"https://api.github.com/users/jhnns","html_url":"https://github.com/jhnns","followers_url":"https://api.github.com/users/jhnns/followers","following_url":"https://api.github.com/users/jhnns/following{/other_user}","gists_url":"https://api.github.com/users/jhnns/gists{/gist_id}","starred_url":"https://api.github.com/users/jhnns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhnns/subscriptions","organizations_url":"https://api.github.com/users/jhnns/orgs","repos_url":"https://api.github.com/users/jhnns/repos","events_url":"https://api.github.com/users/jhnns/events{/privacy}","received_events_url":"https://api.github.com/users/jhnns/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/webpack/webpack/labels/enhancement","name":"enhancement","color":"DDDDDD"},{"url":"https://api.github.com/repos/webpack/webpack/labels/ready","name":"ready","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/webpack/webpack/milestones/6","html_url":"https://github.com/webpack/webpack/milestones/1.0","labels_url":"https://api.github.com/repos/webpack/webpack/milestones/6/labels","id":542363,"number":6,"title":"1.0","description":"\r\n\r\n<!---\r\n@huboard:{\"order\":3.5}\r\n-->\r\n","creator":{"login":"sokra","id":1365881,"avatar_url":"https://avatars.githubusercontent.com/u/1365881?v=3","gravatar_id":"","url":"https://api.github.com/users/sokra","html_url":"https://github.com/sokra","followers_url":"https://api.github.com/users/sokra/followers","following_url":"https://api.github.com/users/sokra/following{/other_user}","gists_url":"https://api.github.com/users/sokra/gists{/gist_id}","starred_url":"https://api.github.com/users/sokra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sokra/subscriptions","organizations_url":"https://api.github.com/users/sokra/orgs","repos_url":"https://api.github.com/users/sokra/repos","events_url":"https://api.github.com/users/sokra/events{/privacy}","received_events_url":"https://api.github.com/users/sokra/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":13,"state":"closed","created_at":"2014-01-21T10:30:20Z","updated_at":"2014-02-24T14:13:57Z","due_on":"2014-01-31T08:00:00Z","closed_at":"2014-02-24T14:13:57Z"},"comments":18,"created_at":"2013-12-26T15:25:06Z","updated_at":"2015-11-30T09:03:08Z","closed_at":"2014-01-31T14:33:47Z","body":"Sometimes webpack throws an error saying `define cannot be used indirect`. It's caused by various third-party modules (like [moment.js](https://github.com/moment/moment/blob/develop/lang/de.js)) which use a module pattern like\r\n\r\n```javascript\r\n(function (factory) {\r\n    if (typeof define === 'function' && define.amd) {\r\n        define(['moment'], factory); // AMD\r\n    } else if (typeof exports === 'object') {\r\n        module.exports = factory(require('../moment')); // Node\r\n    } else {\r\n        factory(window.moment); // Browser global\r\n    }\r\n}(function (moment) { ... }))\r\n```\r\n\r\nWhat's wrong with this module definition? And what can we do about it?"},"comment":{"url":"https://api.github.com/repos/webpack/webpack/issues/comments/160561608","html_url":"https://github.com/webpack/webpack/issues/138#issuecomment-160561608","issue_url":"https://api.github.com/repos/webpack/webpack/issues/138","id":160561608,"user":{"login":"jhnns","id":781746,"avatar_url":"https://avatars.githubusercontent.com/u/781746?v=3","gravatar_id":"","url":"https://api.github.com/users/jhnns","html_url":"https://github.com/jhnns","followers_url":"https://api.github.com/users/jhnns/followers","following_url":"https://api.github.com/users/jhnns/following{/other_user}","gists_url":"https://api.github.com/users/jhnns/gists{/gist_id}","starred_url":"https://api.github.com/users/jhnns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhnns/subscriptions","organizations_url":"https://api.github.com/users/jhnns/orgs","repos_url":"https://api.github.com/users/jhnns/repos","events_url":"https://api.github.com/users/jhnns/events{/privacy}","received_events_url":"https://api.github.com/users/jhnns/received_events","type":"User","site_admin":false},"created_at":"2015-11-30T09:03:08Z","updated_at":"2015-11-30T09:03:08Z","body":"Your `noParse` config is very risky. It will ignore any file with that name. You should add `node_modules` or something to disambiguate it."}}