Commit | Line | Data |
---|---|---|
660940b0 JB |
1 | import del from 'rollup-plugin-delete' |
2 | import ts from '@wessberg/rollup-plugin-ts' | |
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: [ | |
17 | ts({ | |
18 | tsconfig: isDevelopmentBuild | |
19 | ? 'tsconfig.development.json' | |
20 | : 'tsconfig.json' | |
21 | }), | |
22 | del({ | |
23 | targets: 'lib/*' | |
24 | }) | |
25 | ] | |
26 | } |