-
-
Notifications
You must be signed in to change notification settings - Fork 221
Expand file tree
/
Copy pathrollup.config.js
More file actions
32 lines (29 loc) · 818 Bytes
/
rollup.config.js
File metadata and controls
32 lines (29 loc) · 818 Bytes
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
import json from '@rollup/plugin-json';
import nodeResolve from '@rollup/plugin-node-resolve';
import terser from '@rollup/plugin-terser';
import typescript from '@rollup/plugin-typescript';
import bundleSize from 'rollup-plugin-bundle-size';
import pkg from './package.json' with { type: 'json' };
const outputs = [
{
input: 'src/index.ts',
output: {
file: pkg.exports.default,
format: 'esm',
sourcemap: true,
},
plugins: [nodeResolve(), json(), typescript(), bundleSize()],
external: Object.keys(pkg.dependencies),
},
{
input: 'src/index.ts',
output: {
file: pkg.unpkg,
format: 'umd',
name: 'vegaDatasets',
sourcemap: true
},
plugins: [nodeResolve(), json(), typescript(), terser(), bundleSize()]
},
];
export default outputs;