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

Reduce disk impact of Rollup NPM package #4076

Closed
TimvdLippe opened this issue May 11, 2021 · 11 comments · Fixed by #4549
Closed

Reduce disk impact of Rollup NPM package #4076

TimvdLippe opened this issue May 11, 2021 · 11 comments · Fixed by #4549

Comments

@TimvdLippe
Copy link
Contributor

Expected Behavior / Situation

Rollup should have a minimal disk impact in node_modules

Actual Behavior / Situation

Rollup takes up 4.3MB of disk space in the node_modules/ of Chrome DevTools, which puts it in the top 10 largest packages.

988K	node_modules/rollup/dist/shared
364K	node_modules/rollup/dist/rollup.browser.js
 72K	node_modules/rollup/dist/bin
 24K	node_modules/rollup/dist/rollup.d.ts
4.0K	node_modules/rollup/dist/rollup.js
4.0K	node_modules/rollup/dist/loadConfigFile.js
1.3M	node_modules/rollup/dist/rollup.browser.js.map
1.3M	node_modules/rollup/dist/es

Rollup ships with a sourcemap that takes up 30% of its bundle.

Modification Proposal

Similarly to what we have done with Acorn (acornjs/acorn#1023) and ESLint (eslint/eslint#14098), can we remove the sourcemap from the NPM package?

@lukastaegert
Copy link
Member

The source map was added as people are using the REPL to debug Rollup.

@lukastaegert
Copy link
Member

Note that the source map for the browser build is also the only one we are including, specifically to support this use case.

@TimvdLippe
Copy link
Contributor Author

@lukastaegert I understand. Since I think that the majority of Rollup users integrate Rollup in their build system, would it maybe be possible to separate out the REPL-support in a separate NPM package? E.g. something like rollup-repl which would include the browser bundle and the corresponding sourcemap. That would save significant disk space and network usage for the majority of Rollup users (I am assuming that is the case here, I don't have concrete data), while still supporting the Rollup REPL users.

@lukastaegert
Copy link
Member

Might be a good idea for the next major version to think about the package structure. Separating the browser build from the rest is likely a good idea as there should be little overlap between their consumers.

@TimvdLippe
Copy link
Contributor Author

@lukastaegert Quick question: when are you expecting to publish a new major version?

@lukastaegert
Copy link
Member

At least some months from now. It is clear what should be part of that version but work has been blocked by other issues.

This was referenced Aug 30, 2022
@rollup-bot
Copy link
Collaborator

This issue has been resolved via #4593 as part of rollup@3.0.0-5. Note that this is a pre-release, so to test it, you need to install Rollup via npm install rollup@3.0.0-5 or npm install rollup@beta. It will likely become part of a regular release later.

@rollup-bot
Copy link
Collaborator

This issue has been resolved via #4593 as part of rollup@3.0.0-6. Note that this is a pre-release, so to test it, you need to install Rollup via npm install rollup@3.0.0-6 or npm install rollup@beta. It will likely become part of a regular release later.

@rollup-bot
Copy link
Collaborator

This issue has been resolved via #4593 as part of rollup@3.0.0-7. Note that this is a pre-release, so to test it, you need to install Rollup via npm install rollup@3.0.0-7 or npm install rollup@beta. It will likely become part of a regular release later.

@rollup-bot
Copy link
Collaborator

This issue has been resolved via #4593 as part of rollup@3.0.0-8. Note that this is a pre-release, so to test it, you need to install Rollup via npm install rollup@3.0.0-8 or npm install rollup@beta. It will likely become part of a regular release later.

@rollup-bot
Copy link
Collaborator

This issue has been resolved via #4593 as part of rollup@3.0.0. You can test it via npm install rollup.

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

Successfully merging a pull request may close this issue.

3 participants