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

@rnx-kit/types-bundle-config

v1.0.0

Published

Type definitions for bundle configuration

Readme

@rnx-kit/types-bundle-config

Build npm version

TypeScript type definitions for Metro bundling configuration, bundler plugins, server configuration, and React Native platform targets. This package exists to break circular dependencies between rnx-kit packages that share these types.

Installation

yarn add @rnx-kit/types-bundle-config --dev

or if you're using npm

npm add --save-dev @rnx-kit/types-bundle-config

Usage

import type {
  BundleConfig,
  BundleParameters,
  ServerConfig,
  AllPlatforms,
  Plugin,
} from "@rnx-kit/types-bundle-config";

Types

Bundle Configuration

BundleConfig

Defines how a package is bundled. Extends BundleParameters with platform-specific overrides.

| Name | Type | Description | | --------- | ------------------------------------------------- | ------------------------------------------------------ | | id | string \| undefined | Unique identifier for this bundle configuration. | | targets | AllPlatforms[] \| undefined | The platform(s) for which this package may be bundled. | | platforms | Partial<Record<AllPlatforms, BundleParameters>> | Platform-specific overrides for bundling parameters. |

BundleParameters

Parameters controlling how a bundle is constructed. Extends BundlerPlugins and BundleOutputOptions.

| Name | Type | Description | | ---------- | ------------------------------------- | ------------------------------------------------------------------------- | | entryFile | string \| undefined | Path to the entry-point .js file. Either absolute or relative to package. | | assetsDest | string \| undefined | Path where bundle assets are written. | | treeShake | boolean \| SerializerEsbuildOptions | Enable tree shaking via esbuild. | | hermes | boolean \| HermesOptions | Whether to run the Hermes compiler on the output bundle. | | plugins | Plugin[] | List of plugins to add to the bundling process. |

BundleOutputOptions

Output path and encoding options for a bundle, derived from Metro's OutputOptions.

| Name | Type | Description | | ------------------------ | ---------------------- | -------------------------------------------------------------------- | | bundleOutput | string \| undefined | Path to the output bundle file. | | bundleEncoding | string \| undefined | Encoding scheme (UTF-8, UTF-16 LE, or 7-bit ASCII). | | sourcemapOutput | string \| undefined | Path for the bundle source map file. | | sourcemapSourcesRoot | string \| undefined | Path to package source files for portable source-map paths. | | sourcemapUseAbsolutePath | boolean \| undefined | Whether SourceMapURL is reported as a full path or just a file name. |

HermesOptions

Options for the Hermes bytecode compiler.

| Name | Type | Description | | ------- | ----------------------- | ------------------------------ | | command | string \| undefined | Path to hermesc binary. | | flags | string[] \| undefined | Arguments passed to hermesc. |

Server Configuration

ServerConfig

Configuration for the Metro bundle server. Extends BundlerPlugins.

| Name | Type | Description | | ------------ | ----------------------- | --------------------------------------------------------------------- | | projectRoot | string \| undefined | Path to the root of the react-native project. | | assetPlugins | string[] \| undefined | Additional asset plugins for the Metro Babel transformer. | | sourceExts | string[] \| undefined | Additional source-file extensions to include when generating bundles. | | plugins | Plugin[] | List of plugins to add to the bundling process. |

Bundler Plugin Types

Plugin

A plugin is either a module name string or a tuple of [name, options].

Platform Types

AllPlatforms

Union type of supported React Native platforms:

type AllPlatforms =
  | "android"
  | "ios"
  | "macos"
  | "visionos"
  | "web"
  | "win32"
  | "windows";

ALL_PLATFORM_VALUES

Constant array containing all platform values (useful for iteration):

const ALL_PLATFORM_VALUES = [
  "android",
  "ios",
  "macos",
  "visionos",
  "web",
  "win32",
  "windows",
] as const;