import typescript from "rollup-plugin-typescript2"; const pkg = require("./package.json"); const banner = [ "/**", " * Copyright (c) 2019, Peculiar Ventures, All rights reserved.", " */", "", ].join("\n"); const input = "src/index.ts"; const external = Object.keys(pkg.dependencies); export default { input, plugins: [ typescript({ check: true, clean: true, tsconfigOverride: { compilerOptions: { module: "ES2015", } } }), ], external: ["crypto", ...external], output: [ { banner, file: pkg.main, format: "cjs", }, { banner, file: pkg.module, format: "es", }, ], };