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

Allow module to be bundled with browserify and webpack. Fixes #9 #13

Merged
merged 2 commits into from
May 18, 2017

Conversation

dstreet
Copy link
Contributor

@dstreet dstreet commented May 18, 2017

With this change, you can now require('rpc-websockets') in your browser builds. This will be correctly resolved to the browser client only when using browserify or webpack.

There are a couple notable changes:

  • The distributed browser build is now located at dist/index.browser-bundle.js.
  • The API for the browser build matches the server-side build, where Client is exported from the main module, rather than the Client constructor being the default export.
  • src/lib/client.js now exports a factory function to allow for a websocket dependency to be injected. This greatly simplified the isomorphic build process

@dstreet dstreet mentioned this pull request May 18, 2017
@dstreet dstreet changed the title Allow module to be bundled with browserify and webpack. Resolves #9 Allow module to be bundled with browserify and webpack. Fixes #9 May 18, 2017
@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 90.608% when pulling 4d1599a on dstreet:browser-bundle into ee4b8a3 on qaap:master.

1 similar comment
@coveralls
Copy link

coveralls commented May 18, 2017

Coverage Status

Coverage increased (+0.02%) to 90.608% when pulling 4d1599a on dstreet:browser-bundle into ee4b8a3 on qaap:master.

@mkozjak mkozjak merged commit 15c0ef5 into elpheria:master May 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants