Nonchalantly Perusing Magazines

    rollup-plugin-swc
    TypeScript icon, indicating that this package has built-in type declarations

    0.2.0 • Public • Published

    rollup-plugin-swc

    Rollup plugin to compile bundles with the SWC.

    Install

    npm i -D rollup-plugin-swc @swc/core

    Note: @swc/core is a peer dependency

    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

    Install

    npm i rollup-plugin-swc

    DownloadsWeekly Downloads

    740

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    3.79 kB

    Total Files

    6

    Last publish

    Collaborators

    • mentaljam