/react-native-oxc

10x your react-native builds with OXC

Primary LanguageTypeScriptMIT LicenseMIT

react-native-oxc

The Oxidation Compiler is creating a collection of high-performance tools for JavaScript and TypeScript written in Rust.

This library lets you leverage it for resolution (and soon ™ transpilation) to boost your react-native development environment.

Benefits over plain metro

  • 10x faster rebuilds for larger projects
  • Built-in support for tsconfig paths, so no need for babel-plugin-module-resolver
  • Handles exports conditions

Installation

npm install react-native-oxc

Usage

Modify the metro config to look something like this:

// metro.config.js
const { createOxcResolver } = require('react-native—oxc');

const config = {
  resolver: {
    resolveRequest: createOxcResolver({
      // optional oxc resolver options
    }),
  },
};

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT