forked from dotviz/dotviz
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
53 lines (48 loc) · 1.15 KB
/
rollup.config.js
File metadata and controls
53 lines (48 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import terser from '@rollup/plugin-terser';
import typescript from '@rollup/plugin-typescript';
import { dts } from 'rollup-plugin-dts';
import packageJSON from './package.json' with { type: 'json' };
const banner = `/*!
dotviz ${packageJSON.version}
This distribution contains other software in object code form:
Graphviz https://www.graphviz.org
Expat https://libexpat.github.io
*/`;
const tsOptions = {
noEmit: false,
sourceMap: true,
inlineSources: true,
declaration: false,
};
export default [
{
input: 'src/index.ts',
output: {
file: 'npmDist/dotviz.js',
format: 'es',
sourcemap: true,
banner,
},
plugins: [typescript(tsOptions), terser()],
},
{
input: './src/index.ts',
output: [{ file: 'npmDist/dotviz.d.ts', format: 'es' }],
plugins: [dts()],
},
{
input: 'src/dotviz-worker.ts',
output: {
file: 'npmDist/dotviz-worker.js',
format: 'es',
sourcemap: true,
banner,
},
plugins: [typescript(tsOptions), terser()],
},
{
input: './src/dotviz-worker.ts',
output: [{ file: 'npmDist/dotviz-worker.d.ts', format: 'es' }],
plugins: [dts()],
},
];