Skip to content

aelbore/rollup-plugin-swc

 
 

Repository files navigation

rollup-plugin-swc

Rollup plugin to compile bundles with the SWC.

Install

npm i -D rollup-plugin-swc

Usage

// rollup.config.js

import swc from 'rollup-plugin-swc'


export default {
  input: 'index.ts',
  output: {
    dir: 'dist',
    format: 'es',
  },
  plugins: [
    swc({
      jsc: {
        parser: {
          syntax: 'typescript',
        },
        target: 'es2018',
      },
    }),
  ],
}

Options

The plugin takes all the SWC options except the filename.

License

MIT © Petr Tsymbarovich

About

Rollup plugin to compile bundles with the SWC.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 87.8%
  • JavaScript 12.2%