🍣 A Rolldown plugin to transpile TypeScript/JavaScript with the speedy-web-compiler (swc).
Pasted from the Rollup version at @rollup/plugin-swc.
This plugin requires my cat.
Using npm:
npm install @swc/core @wq2/rolldown-plugin-swc --save-devCreate a rolldown.config.js config file and import the plugin:
import swc from '@wq2/rolldown-plugin-swc';
export default {
input: 'src/index.js',
output: {
dir: 'output',
format: 'cjs'
},
plugins: [swc()]
};Then call rolldown and do stuff.
The plugin accepts an object as input parameter to modify the default behavior.
- Type: Options
- Default:
undefined
Just use Oxc from rolldown if you don't need i.e. non-legacy decorators, which should be fine enough for basically everyone except me.