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

package size is more than 20 MB #10835

Closed
yigaldviri opened this issue Oct 27, 2022 · 7 comments · Fixed by #10844
Closed

package size is more than 20 MB #10835

yigaldviri opened this issue Oct 27, 2022 · 7 comments · Fixed by #10844

Comments

@yigaldviri
Copy link

Expected behavior

Package size should be -+ like the previous version

Current behavior

It seems that after the release of version 3.9.0 the package size grew up enormously.
You can see it here:
image

I looked into it and it seems that you are publishing the docs as well.

Not sure if it's a mistake or on propose

Reproducible sample

master

Optional extra steps/info to reproduce

No response

Possible solution

No response

Context

No response

chart.js version

v3.9.0

Browser name and version

No response

Link to your project

No response

@etimberg
Copy link
Member

I don't think publishing the docs was intentional. It was likely something that happened during the npm -> pnpm switch

@LeeLenaleee
Copy link
Collaborator

This is an interesting one, if I do a dry run it only packages the dist helpers and auto folder as specified here in the package.json which npm uses to see what to bundle accoridng to the docs

Chart.js/package.json

Lines 45 to 49 in ae1a720

"files": [
"auto/**",
"dist/**",
"helpers/**"
],

image
But if I check NPM it says it it packaged 550 files and is indeed 20MB instead of 4
image

@etimberg
Copy link
Member

@LeeLenaleee what node/npm versions do you have? Since this came at 3.9.0, it could be that node version update that caused us to have to release 3.9.1

@LeeLenaleee
Copy link
Collaborator

Node: 16.13.1
npm: 8.5.4
pnpm: 7.9.5

image

@kurkle
Copy link
Member

kurkle commented Oct 28, 2022

I think the building of docs, that is done in the CI will, output those in dist

dest: path.resolve(__dirname, '../../dist/docs'),

pnpm run docs
pnpm pack

And it was changed here:
https://github.com/chartjs/Chart.js/pull/10479/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519

@LeeLenaleee
Copy link
Collaborator

But only the extension changed there, seems kind of weird that that causes the docs to be included.

@kurkle
Copy link
Member

kurkle commented Oct 31, 2022

But only the extension changed there, seems kind of weird that that causes the docs to be included.

in package.json files:

        "dist/*.js",
        "dist/chunks/*.js",

was changed to

        "dist/**",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants