Commit | Line | Data |
---|---|---|
7977150f | 1 | import typescript from 'rollup-plugin-typescript2' |
660940b0 | 2 | import del from 'rollup-plugin-delete' |
660940b0 JB |
3 | |
4 | const isDevelopmentBuild = process.env.BUILD === 'development' | |
5 | ||
6 | export default { | |
7 | input: 'src/index.ts', | |
8 | output: { | |
9 | dir: 'lib', | |
10 | format: 'cjs', | |
11 | sourcemap: !!isDevelopmentBuild, | |
12 | preserveModules: true, | |
13 | preserveModulesRoot: 'src' | |
14 | }, | |
15 | external: ['async_hooks', 'cluster', 'events', 'worker_threads'], | |
16 | plugins: [ | |
7977150f | 17 | typescript({ |
660940b0 JB |
18 | tsconfig: isDevelopmentBuild |
19 | ? 'tsconfig.development.json' | |
20 | : 'tsconfig.json' | |
21 | }), | |
22 | del({ | |
23 | targets: 'lib/*' | |
24 | }) | |
25 | ] | |
26 | } |