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

buttermilk@2.0.0 package size increase #15

Open
dr-js opened this issue May 31, 2019 · 5 comments
Open

buttermilk@2.0.0 package size increase #15

dr-js opened this issue May 31, 2019 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@dr-js
Copy link

dr-js commented May 31, 2019

The .tgz file size increased from 76.4 kB to 719.3 kB

Is some extra website code packed under dist/?

npm notice 1.0MB  dist/app.c328ef1a.js
npm notice 1.7MB  dist/app.c328ef1a.map
npm notice 8.1kB  dist/home.fc46b7b9.js
npm notice 303B   dist/home.fc46b7b9.map
npm notice 79B    dist/index.html

Noticed from: https://packagephobia.now.sh/result?p=buttermilk@2.0.0


a diff between $ npm pack buttermilk@2.0.0 $ npm pack buttermilk@1.1.2 output:

@@ -1,31 +1,33 @@
-npm notice package: buttermilk@1.1.2
+npm notice package: buttermilk@2.0.0
 npm notice === Tarball Contents ===
 npm notice 0      package
 npm notice 1.1kB  LICENSE
-npm notice 14.1kB README.md
+npm notice 14.7kB README.md
 npm notice 0      dist
-npm notice 1.6kB  package.json
+npm notice 1.8kB  package.json

-npm notice 0      site
+npm notice 1.0MB  dist/app.c328ef1a.js
+npm notice 1.7MB  dist/app.c328ef1a.map

-npm notice 21.1kB dist/cjs.js
-npm notice 30.6kB dist/cjs.js.map
-npm notice 9.3kB  dist/cjs.min.js
-npm notice 25.8kB dist/cjs.min.js.map
+npm notice 16.4kB dist/cjs.js
+npm notice 26.6kB dist/cjs.js.map
+npm notice 7.4kB  dist/cjs.min.js
+npm notice 22.2kB dist/cjs.min.js.map

-npm notice 20.8kB dist/es.js
-npm notice 30.6kB dist/es.js.map
-npm notice 9.0kB  dist/es.min.js
-npm notice 25.8kB dist/es.min.js.map
+npm notice 16.0kB dist/es.js
+npm notice 26.6kB dist/es.js.map
+npm notice 7.0kB  dist/es.min.js
+npm notice 22.2kB dist/es.min.js.map

+npm notice 8.1kB  dist/home.fc46b7b9.js
+npm notice 303B   dist/home.fc46b7b9.map
+npm notice 79B    dist/index.html

-npm notice 21.6kB dist/standalone.js
-npm notice 32.3kB dist/standalone.js.map
-npm notice 8.0kB  dist/standalone.min.js
-npm notice 25.7kB dist/standalone.min.js.map
+npm notice 16.8kB dist/standalone.js
+npm notice 27.9kB dist/standalone.js.map
+npm notice 5.9kB  dist/standalone.min.js
+npm notice 22.1kB dist/standalone.min.js.map

-npm notice 0      site/.next
-npm notice 0      site/.next/dist

 npm notice === Tarball Details ===
 npm notice name:          buttermilk
-npm notice version:       1.1.2
-npm notice filename:      buttermilk-1.1.2.tgz
+npm notice version:       2.0.0
+npm notice filename:      buttermilk-2.0.0.tgz
-npm notice package size:  76.4 kB
+npm notice package size:  719.3 kB
-npm notice unpacked size: 277.2 kB
+npm notice unpacked size: 3.0 MB
-npm notice shasum:        e704ada0d0384570dfe3f5c7dd3a020f534794d3
-npm notice integrity:     sha512-ZY2gM6TEVqBBg[...]Lx/4uzsrg/1Kw==
+npm notice shasum:        f55bdff0de2af1c9b2b3a1051657632fac86abf5
+npm notice integrity:     sha512-wM3O1cSPHmARZ[...]NdTFoQ/c8OQ3g==
-npm notice total files:   20
+npm notice total files:   22
@quantizor
Copy link
Owner

quantizor commented May 31, 2019 via email

@dr-js
Copy link
Author

dr-js commented May 31, 2019

bundlephobia only checks the files linked in the main field in package.json.

The size increase is at the .tgz level, this should affect package download & node_module size, but should not affect webpack usage.

From https://registry.npmjs.org/buttermilk:

tarball: "https://registry.npmjs.org/buttermilk/-/buttermilk-1.1.2.tgz"
unpackedSize: 277172
...
tarball: "https://registry.npmjs.org/buttermilk/-/buttermilk-2.0.0.tgz"
unpackedSize: 2984310

Maybe try download the tarball, or check the content difference at:

@quantizor
Copy link
Owner

Gotcha, probably the "files" array in package.json needs to be added/updated.

@nerdstep
Copy link
Contributor

It looks like both the src and site build steps output to the dist folder. Obviously dist should only contain the library code since you don't need to ship the site with the npm module.

@quantizor
Copy link
Owner

Thanks Justin, looking into it now

@quantizor quantizor added the bug Something isn't working label Jan 31, 2023
@quantizor quantizor self-assigned this Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants