Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid http dependency in browsers #14

Closed
wants to merge 1 commit into from

Conversation

blakeembrey
Copy link
Member

See #13

@dougwilson
Copy link
Contributor

What happens with "http": false? Will the line http.METHODS still work, or does it need to be altered in some way?

@dougwilson
Copy link
Contributor

i.e. what does require('http') do if the dependency is missing in browserify? Does it throw, return undefined, return {}, or something else?

@jonathanong
Copy link
Member

@blakeembrey
Copy link
Member Author

@dougwilson It returns an empty object in browserify. Haven't checked other CommonJS bundlers. Here's some details: https://github.com/substack/browserify-handbook#browser-field

@dougwilson
Copy link
Contributor

Great, thanks for looking into it @jonathanong and @blakeembrey :) I see the following from the docs:

The above will cause the following to return an empty object into a.

This means we don't actually have to change any of the code in index.js which is why I wanted to confirm :)

@dougwilson
Copy link
Contributor

Published to npm as version 1.1.1

@blakeembrey blakeembrey deleted the browserify branch March 24, 2016 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants