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

Add browser field to package.json to ignore fs-readfile-promise #47

Merged
merged 1 commit into from
Mar 4, 2018

Conversation

arpith
Copy link
Collaborator

@arpith arpith commented Feb 28, 2018

Some bundlers including Browserify[1] and Parcel[2] use the browser field in package.json to ignore modules (using browser-resolve[3]) that do not work well with browsers.
In our case this is the zuliprc related module, fs-readfile-promise.

This commit adds a browser field with fs-readfile-promise set to false to the package.json, so that clients that are bundled with Browserify or Parcel can use zulip-js out of the box.

1: https://github.com/browserify/browserify-handbook#browser-field
2: parcel-bundler/parcel#200
3: https://github.com/defunctzombie/node-browser-resolve

Some bundlers including Browserify[1] and Parcel[2]
use the browser field in package.json to ignore modules
(using browser-resolve[3]) that do not work well with browsers.
In our case this is the zuliprc related module, fs-readfile-promise.

This commit adds a browser field with fs-readfile-promise set to false
to the package.json, so that clients that are bundled with Browserify
or Parcel can use zulip-js out of the box.

1: https://github.com/browserify/browserify-handbook#browser-field
2: parcel-bundler/parcel#200
3: https://github.com/defunctzombie/node-browser-resolve
@timabbott
Copy link
Member

@aero31aero I assume you'll review this?

Copy link
Member

@aero31aero aero31aero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @arpith.

@aero31aero aero31aero merged commit 4c85fa0 into zulip:master Mar 4, 2018
@arpith
Copy link
Collaborator Author

arpith commented Mar 4, 2018 via email

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.

3 participants