Unofficial unplugin wrapping the oxc-minifier Rust-based JavaScript/TypeScript minifier. Provides a unified plugin interface for Vite, Webpack, Rollup, Rolldown, Rspack, and esbuild. Current stable version is 1.1.0, released in 2025. Key differentiators: ~10x faster than Terser in many benchmarks, zero-config TypeScript support, and flexible minification options (compress, mangle, codegen, sourcemap). Requires Node >=20.19.0 and ships TypeScript types.
npm install unplugin-oxc-minifierNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures Vite to use oxc-minifier with console dropping, mangling, and no sourcemaps.
Update Node.js to v20.19.0 or later.
Use import from 'unplugin-oxc-minifier/[bundler]' where [bundler] is vite, rollup, webpack, etc.
Convert your project to ESM or use dynamic import() in an async context.
Use RegExp or string paths; use picomatch/micromatch if you need globs.
Pass compress and mangle directly at top-level; refer to OxcMinifier options documentation.
Only set 'module: true' if your output is ES module format.
Change import to 'unplugin-oxc-minifier/vite' (or /rollup, /webpack, /esbuild, /rolldown, /rspack).
Switch to ES module imports or use dynamic import(): const OxcMinifier = (await import('unplugin-oxc-minifier/vite')).defaultEnsure you are using one of: '/vite', '/rollup', '/webpack', '/esbuild', '/rolldown', '/rspack'. Case-sensitive.
Convert your config file to ESM (e.g., rename .config.js to .config.mjs) or use dynamic import().