🍣 A Rollup plugin to transpile TypeScript/JavaScript with oxc-transformer.
Warning
Work in progress
Tip
If you need to generate declarations consider to use unplugin-isolated-decl
npm i --save-dev rollup oxc-transform oxc-resolve rollup-plugin-oxc-transform
yarn add --dev rollup oxc-transform oxc-resolve rollup-plugin-oxc-transform
pnpm add --save-dev rollup oxc-transform oxc-resolve rollup-plugin-oxc-transform
// rollup.config.js
import { defineConfig } from 'rollup';
import { oxcTransform } from 'rollup-plugin-oxc-transform';
export default defineConfig({
input: 'src/index.js',
output: {
dir: 'dist',
format: 'esm',
},
plugins: [
oxcTransform(/* options */),
// other plugins...
],
});
Tip
Typescript declaration files are included in the plugin release, so you can rely on autocomplete features when providing plugin configuration
- Type:
FilterPattern
- Default:
/\.[mc]?[jt]sx?$/
Which files are processed by the plugin
- Type:
FilterPattern
- Default:
/node_modules/
Which files are excluded from plugin processing
- Type:
ResolveOptions
- Default:
undefined
Options passed to oxc-resolver
.
By default the plugin will provide the following options:
conditionNames
['node', 'import']
extensions
['.ts', '.tsx', '.mjs', '.js', '.cjs', '.jsx']
Note
They can be both customized by passing your own property via resolveOptions
- Type:
Omit<TransformOptions, 'typescript'>
; - Default:
undefined
All options accept by oxc-transform
excluding typescript
property.
Warning
If you need to generate declarations consider to use unplugin-isolated-decl
This plugin is based on @rollup/plugin-swc