Tim van der Lippe | 652ccb7 | 2021-05-27 17:07:12 +0100 | [diff] [blame] | 1 | const pkg = require('./package.json') |
2 | const typescript = require('@rollup/plugin-typescript') | ||||
3 | |||||
4 | export default { | ||||
5 | input: 'src/index.ts', | ||||
6 | external: Object.keys(pkg.dependencies), | ||||
7 | plugins: [typescript()], | ||||
8 | output: [ | ||||
9 | { | ||||
10 | file: pkg.main, | ||||
11 | format: 'cjs', | ||||
12 | exports: 'auto' | ||||
13 | }, | ||||
14 | { | ||||
15 | file: pkg.module, | ||||
16 | format: 'es' | ||||
17 | } | ||||
18 | ] | ||||
19 | } |