text: import resolve from 'rollup-plugin-node-resolve';
  import commonjs from 'rollup-plugin-sourcemaps';
  import sourceMaps from 'rollup-plugin-sourcemaps';
  import typescript from 'rollup-plugin-typescript2';
  import json from 'rollup-plugin-json';
  
  import pkg from './package.json'
  export default {
      input: 'src/index.ts',
      output: [
          {
              file: pkg.main,
              format: 'cjs',
              sourcemap: true,
            },
      ],
      external: [
          ...Object.keys(pkg.dependencies || {}),
          ...Object.keys(pkg.peerDependencies || {}),
      ],
      plugins: [
          // Allow json resolution
          json(),
  
          typescript({
              useTsconfigDeclarationDir: true,
              objectHashIgnoreUnknownHack: true      
          }),
          // Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
          commonjs(),
  
          // Allow node_modules resolution, so you can use 'external' to control
          // which external modules to include in the bundle
          // https://github.com/rollup/rollup-plugin-node-resolve#usage
          resolve(),
  
          // Resolve source maps to the original source
          sourceMaps(),
      ],
  }
          