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

How to explore bundle size? #741

Closed
dgreene1 opened this issue Jun 6, 2020 · 2 comments · Fixed by #705
Closed

How to explore bundle size? #741

dgreene1 opened this issue Jun 6, 2020 · 2 comments · Fixed by #705
Labels
kind: question This is a usage or similar question kind: support Asking for support with something or a specific use case problem: removed issue template OP removed the issue template without good cause solution: duplicate This issue or pull request already exists solution: out-of-scope This is out of scope for this project

Comments

@dgreene1
Copy link

dgreene1 commented Jun 6, 2020

Hi. I’m using TSDX to create a library, and I’m trying to understand why my bundle size is so large. Is anyone aware of any tooling for that?

(And I’m very sorry that this is something that is probably better suited for stack overflow.)

@agilgur5 agilgur5 added solution: out-of-scope This is out of scope for this project problem: removed issue template OP removed the issue template without good cause kind: support Asking for support with something or a specific use case labels Jun 7, 2020
@agilgur5 agilgur5 changed the title Just a question: how to discover why bundle is huge How to explore bundle size? Jun 7, 2020
@vndre
Copy link

vndre commented Jun 7, 2020

Hello, TSDX uses Rollup under the hood so extending its config with any plugin should be easy, for the specific task of analyzing your bundle I would suggest: https://github.com/doesdev/rollup-plugin-analyzer

add it like this:

const analyze = require('rollup-plugin-analyzer')
module.exports = {
  rollup(config, options) {
    config.plugins.push(analyze())
    return config
  },
}

@agilgur5
Copy link
Collaborator

agilgur5 commented Jun 7, 2020

I’m trying to understand why my bundle size is so large. Is anyone aware of any tooling for that?

#705 uses the size-limit package for this, but there's many different options. rollup-plugin-analyzer is one of them as mentioned above. rollup-plugin-visualizer is mentioned in #496 .

(And I’m very sorry that this is something that is probably better suited for stack overflow.)

Yes, this is out-of-scope and not TSDX-specific. Please recognize that you're requesting volunteer maintainers to spend time to answer here by filing an issue instead of spending more of your time on searching or asking on SO. If you think SO is more appropriate, you should ask there. This is also something you can search about as there's quite a lot of tooling for that and even multiple in issues/PRs/code in this repo alone.

@agilgur5 agilgur5 closed this as completed Jun 7, 2020
@agilgur5 agilgur5 linked a pull request Jul 26, 2020 that will close this issue
@agilgur5 agilgur5 added the kind: question This is a usage or similar question label Jul 26, 2020
@agilgur5 agilgur5 added the solution: duplicate This issue or pull request already exists label Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: question This is a usage or similar question kind: support Asking for support with something or a specific use case problem: removed issue template OP removed the issue template without good cause solution: duplicate This issue or pull request already exists solution: out-of-scope This is out of scope for this project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants