{"action":"created","issue":{"url":"https://api.github.com/repos/primus/primus/issues/464","repository_url":"https://api.github.com/repos/primus/primus","labels_url":"https://api.github.com/repos/primus/primus/issues/464/labels{/name}","comments_url":"https://api.github.com/repos/primus/primus/issues/464/comments","events_url":"https://api.github.com/repos/primus/primus/issues/464/events","html_url":"https://github.com/primus/primus/issues/464","id":153418415,"number":464,"title":"Browserify doesn't detect require calls in client-side library","user":{"login":"marcelklehr","id":986878,"avatar_url":"https://avatars.githubusercontent.com/u/986878?v=3","gravatar_id":"","url":"https://api.github.com/users/marcelklehr","html_url":"https://github.com/marcelklehr","followers_url":"https://api.github.com/users/marcelklehr/followers","following_url":"https://api.github.com/users/marcelklehr/following{/other_user}","gists_url":"https://api.github.com/users/marcelklehr/gists{/gist_id}","starred_url":"https://api.github.com/users/marcelklehr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcelklehr/subscriptions","organizations_url":"https://api.github.com/users/marcelklehr/orgs","repos_url":"https://api.github.com/users/marcelklehr/repos","events_url":"https://api.github.com/users/marcelklehr/events{/privacy}","received_events_url":"https://api.github.com/users/marcelklehr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/primus/primus/labels/client","name":"client","color":"0DFF9E"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-06T09:55:55Z","updated_at":"2016-05-06T11:51:23Z","closed_at":null,"body":"The quick-hack solution is to simply `bundle.require` stream and util manually, but I'd like to avoid that."},"comment":{"url":"https://api.github.com/repos/primus/primus/issues/comments/217420125","html_url":"https://github.com/primus/primus/issues/464#issuecomment-217420125","issue_url":"https://api.github.com/repos/primus/primus/issues/464","id":217420125,"user":{"login":"marcelklehr","id":986878,"avatar_url":"https://avatars.githubusercontent.com/u/986878?v=3","gravatar_id":"","url":"https://api.github.com/users/marcelklehr","html_url":"https://github.com/marcelklehr","followers_url":"https://api.github.com/users/marcelklehr/followers","following_url":"https://api.github.com/users/marcelklehr/following{/other_user}","gists_url":"https://api.github.com/users/marcelklehr/gists{/gist_id}","starred_url":"https://api.github.com/users/marcelklehr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcelklehr/subscriptions","organizations_url":"https://api.github.com/users/marcelklehr/orgs","repos_url":"https://api.github.com/users/marcelklehr/repos","events_url":"https://api.github.com/users/marcelklehr/events{/privacy}","received_events_url":"https://api.github.com/users/marcelklehr/received_events","type":"User","site_admin":false},"created_at":"2016-05-06T11:51:23Z","updated_at":"2016-05-06T11:51:23Z","body":"Since Primus.requires is only used in the try-catch statement, it's kind of pointless to have those safe-guards anyway. I'd just replace `Primus.requires` with `require`.\r\n\r\n1. If one really doesn't want that, they could just use the client as a standalone-export-to-global file, no? Alternatively we could make it an option for compiling the library (not trivial but doable, I'd say). Another option would be to just include https://github.com/nodejs/node/blob/master/lib/stream.js which is pretty small.\r\n2. It would only use the browserified stream in node if you use the browserified bundle in node, which would be silly. Or do you mean to use browserify to compile the library in primus?"}}