An open API service indexing awesome lists of open source software.

https://github.com/unplugin/unplugin-oxc

Oxc integration for unplugin.
https://github.com/unplugin/unplugin-oxc

Last synced: 2 months ago
JSON representation

Oxc integration for unplugin.

Awesome Lists containing this project

README

          

# unplugin-oxc

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![Unit Test][unit-test-src]][unit-test-href]

[Oxc](https://oxc.rs/) integration for unplugin.

## Features

- 🚀 **Blazing Fast**: Transform, resolve, and minify files with Oxc, built in Rust.
- 🦾 **Powerful**: Supports TypeScript and React JSX transformation, identifier replacement, syntax lowering, and more.
- 📦 **Zero Config**: No configuration needed for TypeScript support.
- 🎨 **Customizable**: Fine-tune transform, resolve, and minify options.
- 😈 **Drop-in Replacement**: Easily replace [rollup-plugin-esbuild](https://github.com/egoist/rollup-plugin-esbuild) and [@rollup/plugin-node-resolve](https://github.com/rollup/plugins/tree/master/packages/node-resolve).

## Installation

```bash
npm i -D unplugin-oxc
```

Vite

```ts
// vite.config.ts
import Oxc from 'unplugin-oxc/vite'

export default defineConfig({
plugins: [Oxc()],
})
```


Rollup

```ts
// rollup.config.js
import Oxc from 'unplugin-oxc/rollup'

export default {
plugins: [Oxc()],
}
```


Rolldown

```ts
// rolldown.config.js
import Oxc from 'unplugin-oxc/rolldown'

export default {
plugins: [Oxc()],
}
```


esbuild

```ts
import { build } from 'esbuild'
import Oxc from 'unplugin-oxc/esbuild'

build({
plugins: [Oxc()],
})
```


Webpack

```js
// webpack.config.js
import Oxc from 'unplugin-oxc/webpack'

export default {
/* ... */
plugins: [Oxc()],
}
```


Rspack

```ts
// rspack.config.js
import Oxc from 'unplugin-oxc/rspack'

export default {
/* ... */
plugins: [Oxc()],
}
```


unloader

```ts
// unloader.config.ts
import Oxc from 'unplugin-oxc/unloader'

export default defineConfig({
plugins: [Oxc()],
})
```


## Usage

```ts
interface Options {
/**
* @default [/\.[cm]?[jt]sx?$/],
*/
include?: FilterPattern
/**
* @default [/node_modules/],
*/
exclude?: FilterPattern
enforce?: 'pre' | 'post' | undefined
/**
* Transform options passed to `oxc-transform`
*/
transform?: Omit | false
/**
* Resolve options passed to `oxc-resolver`
*/
resolve?: NapiResolveOptions | false
/**
* The plugin will skip resolving node_modules by default.
* Set this to `true` to resolve node_modules.
* @default false
*/
resolveNodeModules?: boolean
/**
* Minify options passed to `oxc-minify`
*/
minify?: Omit | false
sourcemap?: boolean
}
```

## Sponsors





## License

[MIT](./LICENSE) License © 2025-PRESENT [Kevin Deng](https://github.com/sxzz)

[npm-version-src]: https://img.shields.io/npm/v/unplugin-oxc.svg
[npm-version-href]: https://npmjs.com/package/unplugin-oxc
[npm-downloads-src]: https://img.shields.io/npm/dm/unplugin-oxc
[npm-downloads-href]: https://www.npmcharts.com/compare/unplugin-oxc?interval=30
[unit-test-src]: https://github.com/unplugin/unplugin-oxc/actions/workflows/unit-test.yml/badge.svg
[unit-test-href]: https://github.com/unplugin/unplugin-oxc/actions/workflows/unit-test.yml