question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I just noticed that pako’s npm package is rather heavy at 1.5MB: https://packagephobia.com/result?p=pako@2.0.3

Even though pako itself is not necessarily that big, it’s repeated many times: https://www.unpkg.com/browse/pako@2.0.3/dist/

Can some files be avoided? For example you could keep:

  • minified file in browser
  • minified ES5 file
  • inflate for node
  • deflate for node
  • pako.js for node, that requires both inflate and deflate
  • pako.js ESM (threeshakeable)

The current situation only benefits CDN users for browsers, but isn’t ideal for everyone else. The problem is that the more unique entry points you offer, the more likely is that sub-dependencies won’t be deduplicated, because one might require inflate.js and the next pako.min.js

Ideally, only this should be part of an npm package:

  • inflate for node
  • deflate for node
  • pako.js for node, that requires both inflate and deflate
  • pako.js ESM (threeshakeable)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
fregantecommented, Mar 9, 2021
  • useless waste of time

To you maybe. Lambda has size limits, so they do matter.

  • .tgz file size is 400K, not 1500K.

And adm-zip is 26K. Even jszip.tgz, which includes a 2 version, is 100K.

I think you understand why one would pick a more efficient package if it works the same in a scenario.

1reaction
ricardomozartlinocommented, May 18, 2022

I have the same problem, half the package size comes from this lib, very sad

Read more comments on GitHub >

github_iconTop Results From Across the Web

Shipping Heavy Items | UPS - United States
UPS has special guidelines and procedures to ensure that your heavy packages weighing over arrive safely at their destination.
Read more >
Shipping Heavy Items and Large Packages - Parcel Monkey
The cheapest way to ship 50lbs, 100lbs and more with our shipping calculator. Compare prices and book large package delivery services with Parcel...
Read more >
Shipping large items: How to ship big packages - FedEx
Use a strong box. The heavier your items, the sturdier box you need. · Opt for heavy-duty packing tape. · Determine how to...
Read more >
How to Ship Heavy Items: Top Carriers Compared - ShipBob
Cheapest Way to Ship Heavy Items: Carriers and Classes for Shipping Large Items · 1. Use heavy-duty packaging · 2. Choose a carrier...
Read more >
What is the Cheapest Way to Ship Heavy Items in 2022?
Shipping heavy packages for your online store? In this article, we cover the best courier options and the cheapest ways to ship 50...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found