Oxc integration for unplugin.
npm install 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 integration for unplugin.
- 🚀 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 and @rollup/plugin-node-resolve.
``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()],
})
`
`tsoxc-transform
interface Options {
/**
* @default [/\.[cm]?[jt]sx?$/],
*/
include?: FilterPattern
/**
* @default [/node_modules/],
*/
exclude?: FilterPattern
enforce?: 'pre' | 'post' | undefined
/**
* Transform options passed to oxc-resolver
*/
transform?: Omit
/**
* Resolve options passed to true
*/
resolve?: NapiResolveOptions | false
/**
* The plugin will skip resolving node_modules by default.
* Set this to to resolve node_modules.oxc-minify
* @default false
*/
resolveNodeModules?: boolean
/**
* Minify options passed to ``
*/
minify?: Omit
sourcemap?: boolean
}
MIT License © 2025-PRESENT Kevin Deng
[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