text: import babel from 'rollup-plugin-babel';
  import typescript from 'rollup-plugin-typescript2';
  
  import pkg from './package.json';
  
  export default [
    {
      input: 'src/index.ts',
      output: [
        {
          file: pkg.main,
          format: 'cjs',
          sourcemap: true
        },
        {
          file: pkg.module,
          format: 'esm'
        }
      ],
      external: [
        ...Object.keys(pkg.dependencies || {}),
        ...Object.keys(pkg.peerDependencies || {})
      ],
      plugins: [
        typescript({
          typescript: require('typescript')
        }),
        babel({
          exclude: ['node_modules/**']
        })
      ]
    }
  ];
  