{"action":"created","issue":{"url":"https://api.github.com/repos/gdi2290/angular-md5/issues/8","labels_url":"https://api.github.com/repos/gdi2290/angular-md5/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/gdi2290/angular-md5/issues/8/comments","events_url":"https://api.github.com/repos/gdi2290/angular-md5/issues/8/events","html_url":"https://github.com/gdi2290/angular-md5/issues/8","id":97350305,"number":8,"title":"Support Webpack + CommonJS Package Manager","user":{"login":"benoror","id":119117,"avatar_url":"https://avatars.githubusercontent.com/u/119117?v=3","gravatar_id":"","url":"https://api.github.com/users/benoror","html_url":"https://github.com/benoror","followers_url":"https://api.github.com/users/benoror/followers","following_url":"https://api.github.com/users/benoror/following{/other_user}","gists_url":"https://api.github.com/users/benoror/gists{/gist_id}","starred_url":"https://api.github.com/users/benoror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benoror/subscriptions","organizations_url":"https://api.github.com/users/benoror/orgs","repos_url":"https://api.github.com/users/benoror/repos","events_url":"https://api.github.com/users/benoror/events{/privacy}","received_events_url":"https://api.github.com/users/benoror/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-26T21:04:01Z","updated_at":"2015-07-27T20:40:18Z","closed_at":null,"body":"Hi Patrick!\r\n\r\nI am learning Webpack + ES6 and in the process porting my app (main ideas taken [from here](http://angular-tips.com/blog/2015/06/using-angular-1-dot-x-with-es6-and-webpack/), [also here](http://www.shmck.com/webpack-angular-part-3/) and @kentcdodds's [egghead screencasts](https://egghead.io/series/angular-and-webpack-for-modular-applications)).\r\n\r\nThis package is a dependency of my project. Basically I want to be able to implement the following ES6 code:\r\n\r\n```\r\nimport './login.css';\r\n\r\nimport angular from 'angular';\r\nimport uirouter from 'angular-ui-router';\r\nimport md5 from 'angular-md5'; /** this **/\r\n\r\nimport routing from './login.routes';\r\nimport LoginCtrl from './login.controller';\r\n\r\nexport default angular.module('app.main.login', [\r\n\t\tuirouter,\r\n\t\tmd5\r\n\t])\r\n  .config(routing)\r\n  .controller('LoginCtrl', LoginCtrl)\r\n  .name;\r\n```\r\n\r\nI've tried using the following code to support it:\r\n\r\n```\r\nif (typeof module !== \"undefined\" && typeof exports !== \"undefined\" && module.exports === exports){\r\n  module.exports = 'angular-md5';\r\n}\r\n```\r\n**Source: [ui-router release](https://github.com/angular-ui/ui-router/blob/master/release/angular-ui-router.js#L9)*\r\n\r\nActually I updated another  old dependency this same way, and worked fine: https://github.com/benoror/angular-urlify/commit/affc74b6ad8837d4aa88f3d0153dd70a717d2c6f\r\n\r\nI tried the same with angular-md5: https://github.com/benoror/angular-md5/blob/master/lib/index.js#L2\r\n\r\nBut for some reason webpack compiles it wrong, and throws the following error:\r\n\r\n![md5](http://i.imgur.com/fJCgUqL.png)\r\n\r\nI can make a PR to support it, I just need some advice.\r\n\r\nThanks in advance. Cheers!\r\n"},"comment":{"url":"https://api.github.com/repos/gdi2290/angular-md5/issues/comments/125336038","html_url":"https://github.com/gdi2290/angular-md5/issues/8#issuecomment-125336038","issue_url":"https://api.github.com/repos/gdi2290/angular-md5/issues/8","id":125336038,"user":{"login":"gdi2290","id":1016365,"avatar_url":"https://avatars.githubusercontent.com/u/1016365?v=3","gravatar_id":"","url":"https://api.github.com/users/gdi2290","html_url":"https://github.com/gdi2290","followers_url":"https://api.github.com/users/gdi2290/followers","following_url":"https://api.github.com/users/gdi2290/following{/other_user}","gists_url":"https://api.github.com/users/gdi2290/gists{/gist_id}","starred_url":"https://api.github.com/users/gdi2290/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdi2290/subscriptions","organizations_url":"https://api.github.com/users/gdi2290/orgs","repos_url":"https://api.github.com/users/gdi2290/repos","events_url":"https://api.github.com/users/gdi2290/events{/privacy}","received_events_url":"https://api.github.com/users/gdi2290/received_events","type":"User","site_admin":false},"created_at":"2015-07-27T20:40:18Z","updated_at":"2015-07-27T20:40:18Z","body":"can you make a pull-request?"}}