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

[request] include webpack browser bundle to npm package #73

Open
warren-bank opened this issue Jan 15, 2020 · 5 comments
Open

[request] include webpack browser bundle to npm package #73

warren-bank opened this issue Jan 15, 2020 · 5 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@warren-bank
Copy link

Hi. I totally get that "Packaging for browsers is currently highly experimental".

But to make it easier to play with.. would there be an objection to updating the prepublishOnly npm script

  • from:
      "prepublishOnly": "npm run build",
  • to:
      "prepublishOnly": "npm run build && npm run browser:build",
  • so for subsequent releases:
      <script type="text/javascript" src="ipfs-lite.all.min.js"></script>

If the size the bundle adds to the npm package is an issue, then could it be attached to its corresponding tagged release?

PS. If size is a concern, you may also consider adding an .npmignore file to exclude everything in the repo except the dist/ directory generated by the build tasks.

@carsonfarmer
Copy link
Collaborator

carsonfarmer commented Jan 15, 2020

@warren-bank, thanks for the request. I would indeed like to do this. We're about to do some major refactoring and will likely reduce the size of the lib substantially in the very near future. At that time, I think you're 100% right we should both include the browser build in the dist, and probably use .npmignore.

@warren-bank
Copy link
Author

My understanding of these CDNs is that they use npm for their upstream.. so anything published to npm is automagically available through their distribution network(s). Some can also download from tagged releases in github repos.

I see you guys are moving fast.. and I absolutely didn't mean to nitpick;
mainly just a combo of (1) eager to use your awesome library and (2) lazy :)

..joking (sort of)

@carsonfarmer
Copy link
Collaborator

Not nitpicky at all! This is a great suggestion 👍. And yes, I think you're right... just explored this a bit. I'll make sure we add the browser build step to the next published version :)

@warren-bank
Copy link
Author

awesome.. thank you kindly, good sir :)

@carsonfarmer
Copy link
Collaborator

Keeping this open so we don't forget/are held accountable 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants