{"action":"created","issue":{"url":"https://api.github.com/repos/jessepollak/payment/issues/15","labels_url":"https://api.github.com/repos/jessepollak/payment/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/jessepollak/payment/issues/15/comments","events_url":"https://api.github.com/repos/jessepollak/payment/issues/15/events","html_url":"https://github.com/jessepollak/payment/issues/15","id":110559341,"number":15,"title":"Does not build under webpack","user":{"login":"pospi","id":437540,"avatar_url":"https://avatars.githubusercontent.com/u/437540?v=3","gravatar_id":"","url":"https://api.github.com/users/pospi","html_url":"https://github.com/pospi","followers_url":"https://api.github.com/users/pospi/followers","following_url":"https://api.github.com/users/pospi/following{/other_user}","gists_url":"https://api.github.com/users/pospi/gists{/gist_id}","starred_url":"https://api.github.com/users/pospi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pospi/subscriptions","organizations_url":"https://api.github.com/users/pospi/orgs","repos_url":"https://api.github.com/users/pospi/repos","events_url":"https://api.github.com/users/pospi/events{/privacy}","received_events_url":"https://api.github.com/users/pospi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-08T23:12:55Z","updated_at":"2015-10-08T23:23:36Z","closed_at":null,"body":"Modules which `require(payment)` as a dependency cause production webpack builds to fail. It seems like the fact that all files are bundled together is an issue; suspect the fix is to setup a build process that compiles each coffeescript file into a *separate* javascript file, rather than bundling them all together.\r\n\r\nThe error webpack outputs is:\r\n```\r\nWARNING in ./~/card-react/~/payment/lib/payment.js\r\nCritical dependencies:\r\n1:459-466 This seems to be a pre-built javascript file. Though this is possible, it's not recommended. Try to require the original source to get better results.\r\n @ ./~/card-react/~/payment/lib/payment.js 1:459-466\r\n```\r\n\r\nThough it presents as a warning and will pass in some development configurations, it *will* fail in a production build command."},"comment":{"url":"https://api.github.com/repos/jessepollak/payment/issues/comments/146714581","html_url":"https://github.com/jessepollak/payment/issues/15#issuecomment-146714581","issue_url":"https://api.github.com/repos/jessepollak/payment/issues/15","id":146714581,"user":{"login":"pospi","id":437540,"avatar_url":"https://avatars.githubusercontent.com/u/437540?v=3","gravatar_id":"","url":"https://api.github.com/users/pospi","html_url":"https://github.com/pospi","followers_url":"https://api.github.com/users/pospi/followers","following_url":"https://api.github.com/users/pospi/following{/other_user}","gists_url":"https://api.github.com/users/pospi/gists{/gist_id}","starred_url":"https://api.github.com/users/pospi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pospi/subscriptions","organizations_url":"https://api.github.com/users/pospi/orgs","repos_url":"https://api.github.com/users/pospi/repos","events_url":"https://api.github.com/users/pospi/events{/privacy}","received_events_url":"https://api.github.com/users/pospi/received_events","type":"User","site_admin":false},"created_at":"2015-10-08T23:23:36Z","updated_at":"2015-10-08T23:23:36Z","body":"Sorry, just realised this is a duplicate of #1. However the fix specified there (loading `payment/src/payment` instead of just `payment`) doesn't work - you end up with the same error from a dependency of payment itself:\r\n\r\n```\r\nWARNING in ./~/card-react/~/payment/~/qj/lib/qj.js\r\nCritical dependencies:\r\n1:449-456 This seems to be a pre-built javascript file. Though this is possible, it's not recommended. Try to require the original source to get better results.\r\n @ ./~/card-react/~/payment/~/qj/lib/qj.js 1:449-456\r\n```\r\n\r\nYou would also need to load `qj` by its src path to avoid this. PR incoming.."}}