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

added browser target for webpack, browserify #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

added browser target for webpack, browserify #12

wants to merge 1 commit into from

Conversation

oasisvali
Copy link

The browser target in package.json is supported by browserify
and webpack

The buffer module is also used by both bundlers to provide a shim for the node Buffer.

@ashi009
Copy link
Owner

ashi009 commented Oct 5, 2019

This can be done neatly with TypedArray without any shim. Is there are browser only implementation for crc32 around?

@oasisvali
Copy link
Author

oh, I didn't know about TypedArray. That would probably be the correct way to implement it then. I didn't find any browser-only implementations for crc-32, though there were some isomorphic implementations I found when I was looking a while ago...

I just made this small change on my fork since I needed a quick fix for the browser at that time. Feel free to close the PR if you think it's not necessary.

FWIW, webpack and browserify include this shim by default so this shim would be getting included anyway for someone using webpack/browserify in their project.

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

2 participants