{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-sdk-js/issues/603","repository_url":"https://api.github.com/repos/aws/aws-sdk-js","labels_url":"https://api.github.com/repos/aws/aws-sdk-js/issues/603/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-sdk-js/issues/603/comments","events_url":"https://api.github.com/repos/aws/aws-sdk-js/issues/603/events","html_url":"https://github.com/aws/aws-sdk-js/issues/603","id":76150316,"number":603,"title":"Webpack support","user":{"login":"anthonator","id":420061,"avatar_url":"https://avatars.githubusercontent.com/u/420061?v=3","gravatar_id":"","url":"https://api.github.com/users/anthonator","html_url":"https://github.com/anthonator","followers_url":"https://api.github.com/users/anthonator/followers","following_url":"https://api.github.com/users/anthonator/following{/other_user}","gists_url":"https://api.github.com/users/anthonator/gists{/gist_id}","starred_url":"https://api.github.com/users/anthonator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anthonator/subscriptions","organizations_url":"https://api.github.com/users/anthonator/orgs","repos_url":"https://api.github.com/users/anthonator/repos","events_url":"https://api.github.com/users/anthonator/events{/privacy}","received_events_url":"https://api.github.com/users/anthonator/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aws/aws-sdk-js/labels/Feature%20Request","name":"Feature Request","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":49,"created_at":"2015-05-13T22:42:11Z","updated_at":"2016-08-19T11:21:38Z","closed_at":null,"body":"Has anybody gotten this library to work with webpack? The webpack team recently fixed a [ternary require issue](https://github.com/webpack/webpack/issues/627) which fixed a show stopper.\r\n\r\nI was able to fix an issue with loading a JSON file with the `json-loader`. Now I'm getting:\r\n\r\n```\r\nWARNING in ./~/aws-sdk/lib/util.js\r\nCritical dependencies:\r\n40:30-45 the request of a dependency is an expression\r\n43:11-53 the request of a dependency is an expression\r\n @ ./~/aws-sdk/lib/util.js 40:30-45 43:11-53\r\n\r\nWARNING in ./~/aws-sdk/lib/api_loader.js\r\nCritical dependencies:\r\n13:15-59 the request of a dependency is an expression\r\n104:12-46 the request of a dependency is an expression\r\n108:21-58 the request of a dependency is an expression\r\n114:18-52 the request of a dependency is an expression\r\n```\r\n\r\nWhich is causing the individual services to not be included in the packaged bundle.\r\n\r\nSo doing `new AWS.S3()` returns a `is not a function error`.\r\n\r\nIt looks like you might be able to fix this with the [`ContextReplacementPlugin`](https://github.com/webpack/docs/wiki/list-of-plugins#contextreplacementplugin) but I'm not sure how to configure it properly for this scenario.\r\n\r\nDoes anybody have any examples or anything?"},"comment":{"url":"https://api.github.com/repos/aws/aws-sdk-js/issues/comments/240993320","html_url":"https://github.com/aws/aws-sdk-js/issues/603#issuecomment-240993320","issue_url":"https://api.github.com/repos/aws/aws-sdk-js/issues/603","id":240993320,"user":{"login":"jagi","id":1051229,"avatar_url":"https://avatars.githubusercontent.com/u/1051229?v=3","gravatar_id":"","url":"https://api.github.com/users/jagi","html_url":"https://github.com/jagi","followers_url":"https://api.github.com/users/jagi/followers","following_url":"https://api.github.com/users/jagi/following{/other_user}","gists_url":"https://api.github.com/users/jagi/gists{/gist_id}","starred_url":"https://api.github.com/users/jagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jagi/subscriptions","organizations_url":"https://api.github.com/users/jagi/orgs","repos_url":"https://api.github.com/users/jagi/repos","events_url":"https://api.github.com/users/jagi/events{/privacy}","received_events_url":"https://api.github.com/users/jagi/received_events","type":"User","site_admin":false},"created_at":"2016-08-19T11:21:38Z","updated_at":"2016-08-19T11:21:38Z","body":"@prescottprue I can use solution proposed by @basarat because I'm using `create-react-app` tool which does not allow modifying webpack config. Actually it does but it would require \"ejecting\" project and that will make it harder later to update to newest versions of react."}}
{"actor":{"display_login":"jagi"}}