Skip to content

Bundle Analysis Configuration Feedback #270

Open

Description

@codecovdesign

Thanks for dropping by! 👋

We'd love your feedback about the bundle analysis configuration and tool generally..

  • How was your experience setting up bundle analysis in your repo?
  • Did you experience any challenges?
  • What did you think about the documentation?
  • What would improve the set up process?
  • How can bundle analysis help you further?
  • Any general thoughts you'd like to share!

We greatly appreciate your time and thoughts - looking forward to hearing from you ❤

Codecov team

This issue is intended to share and collect feedback about the tool. If you have support needs or questions, please see our support page.

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀on Feb 9, 2024
  2. codecovdesign commented on Apr 10, 2024

    @codecovdesign
    Author

    @houserx-jmcc thank you for the feedback 🙏

    nice to set a threshold change to not trigger a comment

    I've added the update proposal to this WIP issue: codecov/engineering-team#1350

  3. karl-sjogren commented on Apr 11, 2024

    @karl-sjogren

    We've been running this for a few weeks now and it was really easy to setup and has worked fine.

    However, something that would be really useful is some way to filter or split bundles when reporting. In its simplest form an option to specify which file extensions to include/exclude would suffice.

    We are using Vite for our project and import our styles into the entry JS file, however when building for deployment we split out the CSS stuff into a separate file. This removes the styles themselves from the bundle analysis, but all the other stuff such as images and fonts that were included are still there.

    image

    I'm only interested in the javascript parts (or possibly having a separate bundle for the styles/assets). Right now our bundle reports as 490kb which would be way to large for our scripts, but seeing as it is fonts in several formats and a few SVGs the size is quite OK. It makes it really hard to differentiates on changes though.

    Something like this would be great to be able to do.

    export default defineConfig({
      plugins: [
        codecovVitePlugin({
          enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
          bundleName: 'script-bundle',
          uploadToken: process.env.CODECOV_TOKEN,
          extensions: [
            '.js'
          ]
        }),
        codecovVitePlugin({
          enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
          bundleName: 'style-bundle',
          uploadToken: process.env.CODECOV_TOKEN,
          extensions: [
            '.css',
            '.woff',
            '.woff2',
            '.svg',
            '.png',
          ]
        })
      ]
    });

    Also, if you look at the screenshot above the gzip size is completely wrong for some reason.

  4. codecovdesign commented on Apr 11, 2024

    @codecovdesign
    Author

    @karl-sjogren thanks for the great feedback! 🙏

    some way to filter or split bundles when reporting

    From my understanding of your feedback, based on that I created this issue here: codecov/engineering-team#1562. Would you say this accurately captures the issue? If TLDR, the goal is for you to specify the files you'd like to group to have analysis of size / changes. This way the reporting is more focused on what's important to you (generic filters for JS, etc don't do the job) - Is this understanding right?

  5. karl-sjogren commented on Apr 11, 2024

    @karl-sjogren

    Yes that looks good to me! Thanks!

  6. estevaolucas commented on Apr 29, 2024

    @estevaolucas

    Hi. I've been using this plugin but Codecov doesn't show any data yet, only the "Configure bundle analysis" info.

    Wondering what can be wrong in my setup (with Nx). Is this plugin generating some manifest file that is than uploaded to Codecov? How can I debug it. Thanks

  7. nicholas-codecov commented on Apr 29, 2024

    @nicholas-codecov

    Hi. I've been using this plugin but Codecov doesn't show any data yet, only the "Configure bundle analysis" info.

    Wondering what can be wrong in my setup (with Nx). Is this plugin generating some manifest file that is than uploaded to Codecov? How can I debug it. Thanks

    @estevaolucas are you able to share your repo/config?

    If it's working you should be seeing logs in your build informing you of what the plugin is doing, there is also a dryRun option that you can use to have the stats information outputted to a json file in your out dir. You can see more in out plugin config docs

  8. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀on Apr 29, 2024
  9. estevaolucas commented on Apr 29, 2024

    @estevaolucas

    @nicholas-codecov thanks for you reply! I didn't notice there's a debug flag. That helped me to figure the issue on my setup: report was never uploading analysis due to missing token in enableBundleAnalysis to enable it. Thanks for you help

  10. 36 remaining items

  11. tonynchen commented on Mar 3, 2025

    @tonynchen

    Hello, we are unable to upload the bundle for analysis. We are using GitHub Actions, and I have attached the following errors with debugging turned on.

    $ tsc && vite build
    vite v5.2.8 building for production...
    [codecov] Sending telemetry data on issues and performance to Codecov. To disable telemetry, set `options.telemetry` to `false`.
    transforming...
    ✓ 3948 modules transformed.
    rendering chunks...
    [codecov] Detecting CI provider
    [codecov] Detected CI provider: GitHub Actions
    [codecov] Using branch: tchen/bundle-analysis
    [codecov] Using build: 130****
    [codecov] Using slug: ****/console
    [codecov] Using build: 130****
    computing gzip size...
    [codecov] Failed to get job URL: 404
    [codecov] Using slug: ****/console
    [codecov] Using build: 130****
    [codecov] Using build URL: https://github.com/****/console/actions/runs/130****
    [codecov] Using commit: e1****
    [codecov] Using compareSha: f3****
    [codecov] Using job: build-and-test
    [codecov] Using pr: 517
    [codecov] Using slug: ****/console
    [codecov] Attempting to fetch `get-pre-signed-url`, attempt: 1
    dist/index.html                                           1.71 kB │ gzip:     0.81 kB
    .
    .
    .
    .
    dist/assets/Overview-****.js                         35.15 kB │ gzip:     7.11 kB
    
    (!) Some chunks are larger than 500 kB after minification. Consider:
    - Using dynamic import() to code-split the application
    - Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
    - Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
    dist/assets/****-****.js                 35.28 kB │ gzip:    13.02 kB
    .
    .
    dist/assets/index-****.js                        10,565.20 kB │ gzip: 2,997.78 kB
    [codecov] `get-pre-signed-url` fetch attempt 1 failed
    [codecov] Attempting to fetch `get-pre-signed-url`, attempt: 2
    [codecov] `get-pre-signed-url` fetch attempt 2 failed
    [codecov] Attempting to fetch `get-pre-signed-url`, attempt: 3
    [codecov] `get-pre-signed-url` fetch attempt 3 failed
    [codecov] `get-pre-signed-url` failed after 3 attempts
    [codecov] Failed to get pre-signed URL, bad response: "400 - Bad Request"
    [codecov] Error getting pre-signed URL: "Error: Failed to get pre-signed URL"
    ✓ built in 46.65s
    Finished building UI
    

    Is someone able to look into this?

  12. nicholas-codecov commented on Mar 3, 2025

    @nicholas-codecov

    Hi @tonynchen, are you able to provide more information? To try and better assist are you able to share the GH organization, repo name, and potentially even the commit SHA?

  13. tonynchen commented on Mar 3, 2025

    @tonynchen

    Hi @tonynchen, are you able to provide more information? To try and better assist are you able to share the GH organization, repo name, and potentially even the commit SHA?

    @nicholas-codecov
    Hi, I am unable to share the repo/org, since this is an enterprise application. However, happy to provide other details if I can

  14. rohan-at-sentry commented on Mar 3, 2025

    @rohan-at-sentry

    Hi @tonynchen, are you able to provide more information? To try and better assist are you able to share the GH organization, repo name, and potentially even the commit SHA?

    @nicholas-codecov Hi, I am unable to share the repo/org, since this is an enterprise application. However, happy to provide other details if I can

    In that case can I get you to write in to support with those details so we can take a closer look?

  15. tonynchen commented on Mar 4, 2025

    @tonynchen

    Hi @tonynchen, are you able to provide more information? To try and better assist are you able to share the GH organization, repo name, and potentially even the commit SHA?

    @nicholas-codecov Hi, I am unable to share the repo/org, since this is an enterprise application. However, happy to provide other details if I can

    In that case can I get you to write in to support with those details so we can take a closer look?

    Sounds good, will do.

  16. somewhatabstract commented on Apr 6, 2025

    @somewhatabstract

    Rollup plugin isn't including my ESM output for some reason; only CJS (see https://github.com/somewhatabstract/ancesdir)

  17. removed
    Feedback
    on Jul 21, 2025
  18. nick-galluzzo commented on Nov 20, 2025

    @nick-galluzzo

    +1 on @karl-sjogren's feedback about filtering assets by extension.

    We're experiencing extremely long bundle analysis email notifications because they include many assets, like .png, .gif, .svg, .woff files and we'd like to focus on bundle analysis for JS/CSS files only.

    It would be helpful to have a configuration option to filter assets by extension.

  19. swrobel commented on Jan 6, 2026

    @swrobel

    Any plans for support of rspack as a webpack alternative?

  20. matthewtusker commented on Jan 16, 2026

    @matthewtusker

    Our bundle analysis appears to have stopped working. I don't know when/why, but I've tweaked the config in Webpack and it is now uploading during asset compilation, but nothing is appearing in Codecov. Every commit (including on master) is reporting "Missing head report". I don't know where it's failing and I don't know how to debug it effectively.

  21. rlorenzo commented on Feb 24, 2026

    @rlorenzo

    @codecov/[email protected] doesn't support Vite 7; the peer dependency is "4.x || 5.x || 6.x".

    Any plans to add Vite 7 support? Also, Vite 8 is in beta and will be released soon.

    I wish I can install this and try it out.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions