2020-12-03 14:41:29 +01:00
|
|
|
import ts from 'rollup-plugin-typescript2'
|
|
|
|
import { terser } from 'rollup-plugin-terser'
|
2019-06-12 05:04:34 +02:00
|
|
|
|
2020-12-03 14:41:29 +01:00
|
|
|
import pkg from './package.json'
|
2019-06-12 05:04:34 +02:00
|
|
|
|
2020-12-03 14:41:29 +01:00
|
|
|
const PROD = !process.env.ROLLUP_WATCH
|
2019-11-19 17:18:42 +01:00
|
|
|
|
2019-06-12 05:04:34 +02:00
|
|
|
export default [
|
2019-06-19 15:41:57 +02:00
|
|
|
{
|
2020-12-03 14:41:29 +01:00
|
|
|
input: 'src/index.ts',
|
2019-06-19 15:42:04 +02:00
|
|
|
output: [
|
2019-06-19 22:34:18 +02:00
|
|
|
{ file: pkg.module, format: 'es' },
|
2019-06-19 15:41:57 +02:00
|
|
|
{ file: pkg.main, format: 'cjs' },
|
2019-06-12 05:04:34 +02:00
|
|
|
],
|
2020-12-03 14:46:45 +01:00
|
|
|
plugins: [ts(), PROD && terser()],
|
2019-06-19 15:41:57 +02:00
|
|
|
},
|
2020-12-03 14:41:29 +01:00
|
|
|
]
|