unplugin-oxc

Oxc integration for unplugin.

MIT 38 个版本
安装
npm install unplugin-oxc
yarn add unplugin-oxc
pnpm add unplugin-oxc
bun add unplugin-oxc
README

unplugin-oxc

npm version npm downloads Unit Test

Oxc 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 and @rollup/plugin-node-resolve.

Installation

npm i -D unplugin-oxc
Vite
// vite.config.ts
import Oxc from 'unplugin-oxc/vite'

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


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

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


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

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


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

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


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

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


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

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


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

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


Usage

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<TransformOptions, 'sourcemap'> | 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<MinifyOptions, 'sourcemap'> | false
  sourcemap?: boolean
}

Sponsors

License

MIT License © 2025-PRESENT Kevin Deng

版本列表
0.6.1 2026-04-23
0.6.0 2026-03-07
0.5.7 2025-12-21
0.5.6 2025-12-14
0.5.5 2025-11-17
0.5.4 2025-11-13
0.5.3 2025-10-06
0.5.2 2025-09-16
0.5.1 2025-08-20
0.5.0 2025-08-12
0.4.9 2025-08-05
0.4.8 2025-07-25
0.4.7 2025-07-21
0.4.6 2025-06-26
0.4.5 2025-05-31
0.4.4 2025-05-20
0.4.3 2025-05-13
0.4.2 2025-05-10
0.4.1 2025-05-09
0.4.0 2025-05-09
0.3.7 2025-05-08
0.3.6 2025-04-24
0.3.5 2025-04-23
0.3.4 2025-04-19
0.3.3 2025-04-03
0.3.2 2025-03-21
0.3.1 2025-03-19
0.3.0 2025-03-19
0.2.8 2025-03-11
0.2.7 2025-03-09
0.2.6 2025-03-04
0.2.5 2025-03-02
0.2.4 2025-02-12
0.2.3 2025-02-12
0.2.2 2025-02-12
0.2.1 2025-02-11
0.2.0 2025-02-11
0.1.0 2025-02-11