max-mapper / max-mapper/nets

possibility to leave out buffer for browserify build?

Open
#7 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
101
Forks
10
PR merge metrics
No merged PRs in 30d

Description

I've a little lib that is a wrapper of a REST API, and we use it both in browser and node.
When I build it with browserify, ~90% of the code is Buffer. Can I somehow leave it out of the build, and do the `encoding: undefined` thing, at least for browser usage?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the browserify build and how Buffer is included in the browser bundle, then inspect the browser and Node usage of the REST API wrapper. Determine whether the browser path can use encoding: undefined without affecting Node usage. Done means the browser build excludes the unnecessary Buffer code while both environments continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
api, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.