Skip to content

Instantly share code, notes, and snippets.

@mbrowne
Created February 4, 2022 21:43
Show Gist options
  • Select an option

  • Save mbrowne/4497fe8827c6267bda3b9a8133d2e1c9 to your computer and use it in GitHub Desktop.

Select an option

Save mbrowne/4497fe8827c6267bda3b9a8133d2e1c9 to your computer and use it in GitHub Desktop.

Revisions

  1. mbrowne created this gist Feb 4, 2022.
    26 changes: 26 additions & 0 deletions rollup.config.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    import autoExternal from 'rollup-plugin-auto-external'
    import json from '@rollup/plugin-json'
    import ts from 'rollup-plugin-ts'

    export default {
    input: ['src/index.ts'],

    plugins: [
    // allow .json files to be imported
    json(),

    ts({
    transpiler: 'swc',
    }),

    autoExternal(),
    ],

    output: [
    {
    dir: 'build',
    format: 'cjs',
    sourcemap: true,
    },
    ],
    }