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

@ecrindigital/facetpack

v0.2.0

Published

High-performance Metro transformer powered by OXC

Downloads

177

Readme

facetpack

npm version License: MIT

High-performance Metro transformer powered by OXC and Rust.

Replace Babel with a blazing-fast native transformer in your React Native project.

Built by Ecrin Digital.

Features

  • 10-50x Faster - Native Rust transformer powered by OXC
  • Drop-in Replacement - Just wrap your Metro config
  • TypeScript Support - Full TypeScript parsing and type stripping
  • JSX/TSX Support - Automatic and classic runtime support
  • Source Maps - Full source map support for debugging
  • Zero Config - Works out of the box with sensible defaults

Installation

npm install facetpack facetpack-native
# or
yarn add facetpack facetpack-native
# or
pnpm add facetpack facetpack-native

Usage

Wrap your Metro configuration with withFacetpack:

// metro.config.js
const { getDefaultConfig } = require('@react-native/metro-config');
const { withFacetpack } = require('facetpack');

const config = getDefaultConfig(__dirname);

module.exports = withFacetpack(config);

With Options

// metro.config.js
const { getDefaultConfig } = require('@react-native/metro-config');
const { withFacetpack } = require('facetpack');

const config = getDefaultConfig(__dirname);

module.exports = withFacetpack(config, {
  // JSX runtime: 'automatic' (default) or 'classic'
  jsxRuntime: 'automatic',

  // Import source for automatic runtime
  jsxImportSource: 'react',

  // Enable TypeScript transformation (default: true)
  typescript: true,

  // Enable JSX transformation (default: true)
  jsx: true,
});

With Expo

// metro.config.js
const { getDefaultConfig } = require('expo/metro-config');
const { withFacetpack } = require('facetpack');

const config = getDefaultConfig(__dirname);

module.exports = withFacetpack(config);

API

withFacetpack(config, options?)

Wraps a Metro configuration with the Facetpack transformer.

Parameters

| Parameter | Type | Description | |-----------|------|-------------| | config | MetroConfig | Your Metro configuration object | | options | FacetpackOptions | Optional configuration options |

Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | jsx | boolean | true | Enable JSX transformation | | jsxRuntime | 'automatic' \| 'classic' | 'automatic' | JSX runtime mode | | jsxImportSource | string | 'react' | Import source for automatic runtime | | jsxPragma | string | 'React.createElement' | Pragma for classic runtime | | jsxPragmaFrag | string | 'React.Fragment' | Fragment pragma for classic runtime | | typescript | boolean | true | Strip TypeScript types | | sourceExts | string[] | ['ts', 'tsx', 'js', 'jsx', 'mjs', 'cjs'] | File extensions to transform |

How It Works

Facetpack replaces Metro's default Babel transformer with a native Rust transformer powered by OXC. This provides significant performance improvements:

| Operation | vs Babel | |-----------|----------| | Parse | ~50x faster | | Transform | ~20x faster |

The transformer handles:

  • TypeScript → JavaScript (type stripping)
  • JSX → JavaScript (createElement or jsx-runtime)
  • Source map generation

Requirements

  • React Native 0.73+
  • Metro 0.80+
  • Node.js 18+

Compatibility

Facetpack is designed to be a drop-in replacement for Babel in most React Native projects. However, if you rely on specific Babel plugins or transforms, you may need to keep Babel for those files.

License

MIT - see LICENSE for details.

Credits

  • OXC - The high-performance JavaScript toolchain
  • NAPI-RS - Rust bindings for Node.js

Made with Rust by Ecrin Digital