npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rx-angular/rebundle

v1.0.1

Published

@rx-angular/rebundle is an esbuild bundler plugin for Angular, optimized for reducing the amount of bundles.

Readme

@rx-angular/rebundle

Tools to optimize build outputs from Angular when using Esbuild.

Motivation

Problem Statement

The Angular CLI's migration from Webpack to Esbuild has brought massive build time performance improvements, but can cause runtime performance degradations on large projects. The root cause is the esbuild code splitting algorithm, which focuses on minimizing the amount of code required by any entry point of the application. However, it does not consider entry point hierarchy or application-specific aspects, resulting in excessive initial chunks (often 100+ small files) that cause network thrashing, known as The Chunk Gap.

To address some of these issues, the Angular team has added the experimental chunk optimizer, which rebundles the application to reduce the number of chunks. However, this solution is limited and cannot be extended with custom configurations.

For a deeper understanding of this issue, consult the architecture and problem statement docs.

Solution

@rx-angular/rebundle is a set of tools that allows users to optimize the bundle output of Angular applications beyond the Angular experimental chunk optimizer. By default, it provides additional size-based and reachability-based optimizations which most apps can benefit from, while remaining fully configurable for complex scenarios.

Impact

By employing advanced chunking strategies, @rx-angular/rebundle consolidates initial and dynamic chunks based on dependency graphs and size constraints. This leads to significantly fewer HTTP requests, mitigating network thrashing and restoring fast Largest Contentful Paint (LCP) in HTTP/2 environments.

For real-world impact data, see this demo discussion.

Getting Started

Please see the Setup Guide for full installation and usage instructions for both Angular CLI and Nx workspaces.

Installation

Install the package from npm:

npm install @rx-angular/rebundle --save-dev
# or
yarn add @rx-angular/rebundle -D

Usage

As of now, the bundle optimizer is primarily available as an Esbuild plugin and integrates seamlessly with Nx.

Usage with Nx

Add the plugin to your build target in your project.json:

{
  "build": {
    "executor": "@nx/angular:application",
    "options": {
      "plugins": ["@rx-angular/rebundle"]
    }
  }
}

Configuration

You can specify additional configuration options to fine-tune the chunking behavior. For instance, to explicitly set a maximum number of output chunks:

{
  "build": {
    "executor": "@nx/angular:application",
    "options": {
      "plugins": [
        {
          "path": "@rx-angular/rebundle",
          "options": {
            "maxChunks": 6,
            "enableSizeBasedMerging": true
          }
        }
      ]
    }
  }
}

Merge Strategies & Configuration

The esbuild chunking algorithm treats every dynamic import as an independent entry point, missing opportunities to merge chunks that are only ever loaded together in the context of an Angular SPA. @rx-angular/rebundle fixes this by analyzing the module graph and performing reachability and size-based merging.