Feature

Bundle Analysis

Keep frontend performance up by keeping TypeScript and JavaScript bundle size down.

Bundle analysis in your pull request

Your bundle size and change are shown in a pull request comment and are updated with each build. Having this information in plain view allows you to quickly decide whether you need to investigate further or move forward with your merge.

Codecov Bundle Analysis in your pull request

Bundle stats with size over time

Clicking through to Codecov, you’ll see the bundle size and estimated load time. You’ll also see a graph showing your TypeScript or JavaScript bundle size over time that makes it easy to identify which commit most affected your bundle.

codecov screenshot

Asset and module details

Find exactly what’s spiking your bundle size by digging into the assets and modules within your bundle. Sort by size, file type, or load time to find optimization opportunities even faster.

Asset and module details

Status Checks

Don’t just observe, take action with Status Checks. Prevent oversized bundles from negatively impacting performance by using Status Checks to limit bundles’ absolute size or percent change, blocking them from being merged.

status checks

FAQs

What is a JavaScript bundle?

A JavaScript bundle is a single file containing all the Javascript Code needed for an application, feature, module, or web page section. Bundling combines multiple modules and files, which reduces the number of HTTP requests and simplifies the loading process for web applications.

What is a “good” JavaScript bundle size?

A “good” JavaScript bundle size typically falls under 300 KB after minification and compression. However, the ideal size depends on the complexity of your app and user network conditions, aiming for minimal load time while retaining functionality.

What is the impact of bundle size?

Large JavaScript bundles increase load time, parsing, and execution time, negatively affecting performance and user experience. Slower applications can result in higher bounce rates, particularly on mobile or slower connections.

How can I reduce JavaScript bundle size?

Reduce bundle size by eliminating unused code with tree-shaking, code-splitting, minification, and lazy loading. Using lighter dependencies and regularly running bundle analysis helps optimize your code further.

How do I enable JavaScript bundling?

JavaScript bundling can be enabled using build tools such as Webpack, Vite, Parcel, or Rollup. These tools automatically bundle your code during the build process, optimizing it for production environments.

How does a bundler work?

A bundler works by combining all JavaScript modules and dependencies into a single file. It parses the code to identify dependencies and optimizes them through techniques like minification, dead code elimination, and module resolution.

How does bundling relate to code splitting?

Bundling and code splitting are complementary. While bundling combines files into a single package, code splitting breaks up the bundle into smaller chunks that load only when needed. This improves performance by avoiding loading all the code up front.

Before we redirect you to GitHub...
In order to use Codecov an admin must approve your org.