{"id":41901,"library":"rollup-plugin-oxc","title":"rollup-plugin-oxc","description":"A Rollup plugin that combines resolving, transforming, minifying TypeScript, and generating type declarations using the oxc toolchain. Current stable version is 0.7.1, released monthly. It replaces multiple plugins like @rollup/plugin-node-resolve, @rollup/plugin-typescript, and @rollup/plugin-terser with a single unified plugin. Key differentiators include deep integration with oxc for high performance, support for tsconfig-based options, and compatibility with both Rollup and Rolldown. It is ESM-only and requires Rollup 4+.","status":"active","version":"0.7.1","language":"javascript","source_language":"en","source_url":"https://github.com/startracex/rollup-plugin-oxc","tags":["javascript","rollup","plugin","oxc","transform","resolve","minify","typescript","dts"],"install":[{"cmd":"npm install rollup-plugin-oxc","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-oxc","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-oxc","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; plugin only works with Rollup","package":"rollup","optional":false}],"imports":[{"note":"Package is ESM-only; require() will fail. Use import statement.","wrong":"const oxc = require('rollup-plugin-oxc')","symbol":"default","correct":"import oxc from 'rollup-plugin-oxc'"},{"note":"OxcOptions is a TypeScript type; use type import for runtime safety.","wrong":"import { OxcOptions } from 'rollup-plugin-oxc'","symbol":"OxcOptions","correct":"import type { OxcOptions } from 'rollup-plugin-oxc'"},{"note":"Plugins are exported as default, not named. Named export does not exist.","wrong":"import { oxc } from 'rollup-plugin-oxc'","symbol":"oxc","correct":"import oxc from 'rollup-plugin-oxc'"}],"quickstart":{"code":"import oxc from 'rollup-plugin-oxc';\n\nexport default {\n  input: 'src/index.ts',\n  output: {\n    dir: 'dist',\n    format: 'esm',\n  },\n  plugins: [\n    oxc({\n      minify: true,\n      tsconfig: 'tsconfig.json',\n    }),\n  ],\n};","lang":"typescript","description":"This shows a minimal Rollup configuration using rollup-plugin-oxc to bundle a TypeScript entry point with minification enabled."},"warnings":[{"fix":"Use ESM imports: `import oxc from 'rollup-plugin-oxc'`","message":"Package is ESM-only; using require() will throw an error.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Use default import: `import oxc from 'rollup-plugin-oxc'`","message":"Named export 'oxc' does not exist; only default export is available.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Use `import type { OxcOptions } from 'rollup-plugin-oxc'`","message":"TypeScript type 'OxcOptions' is only exported as a type; importing it at runtime will fail.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Remove the other plugins and use only oxc().","message":"The plugin replaces @rollup/plugin-node-resolve, @rollup/plugin-typescript, and @rollup/plugin-terser; do not combine them.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Check changelog and migrate to new configuration shape if needed.","message":"The `resolve` option may be deprecated in future versions in favor of standalone oxc-resolver integration.","severity":"deprecated","affected_versions":">=0.5.0"}],"env_vars":null,"search_vec":"'0.7.1':26 '4':74 'base':57 'combin':9 'compat':60 'current':22 'declar':17 'deep':46 'differenti':44 'dts':83 'esm':69 'esm-on':68 'generat':15 'high':51 'includ':45 'integr':47 'javascript':75 'key':43 'like':33 'minifi':12,81 'month':28 'multipl':31 'option':58 'oxc':4,20,49,78 'perform':52 'plugin':3,7,32,42,77 'releas':27 'replac':30 'requir':72 'resolv':10,80 'rolldown':65 'rollup':2,6,63,73,76 'rollup-plugin-oxc':1 'rollup/plugin-node-resolve':34 'rollup/plugin-terser':37 'rollup/plugin-typescript':35 'singl':40 'stabl':23 'support':53 'toolchain':21 'transform':11,79 'tsconfig':56 'tsconfig-bas':55 'type':16 'typescript':13,82 'unifi':41 'use':18 'version':24","created_at":"2026-06-04T18:54:39.378748+00:00","updated_at":"2026-06-04T18:54:39.378748+00:00","problems":[{"fix":"Change to `import oxc from 'rollup-plugin-oxc'`","cause":"Using CommonJS require() to import an ESM-only package.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module not supported"},{"fix":"Use `import oxc from 'rollup-plugin-oxc'`","cause":"Trying to import a named export 'oxc' when only default export exists.","error":"SyntaxError: Named export 'oxc' not found. The requested module 'rollup-plugin-oxc' is a CommonJS module, which may not support all module.exports as named exports."},{"fix":"Ensure you pass an object with valid options or omit the argument entirely.","cause":"If you imported the default incorrectly or passed an invalid argument.","error":"TypeError: oxc is not a function"},{"fix":"Update Rollup: `npm install rollup@latest`","cause":"Older version of Rollup is installed.","error":"Error: Rollup must be at least version 4.0.0 to use this plugin."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/startracex/rollup-plugin-oxc#readme","github":"https://github.com/startracex/rollup-plugin-oxc","docs":null,"changelog":null,"pypi":null,"npm":"rollup-plugin-oxc","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}