-
Notifications
You must be signed in to change notification settings - Fork 88
/
Copy pathrollup.config.mjs
43 lines (42 loc) · 1008 Bytes
/
rollup.config.mjs
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
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
import typescript from '@rollup/plugin-typescript';
import builtins from 'rollup-plugin-node-builtins';
import globals from 'rollup-plugin-node-globals';
import { visualizer } from 'rollup-plugin-visualizer';
export default {
input: 'src/index.ts',
output: [
{
dir: 'dist/verifier',
format: 'cjs',
name: 'Verifier'
},
{
dir: 'dist/verifier-es',
format: 'es',
name: 'Verifier'
}
],
plugins: [
resolve({
browser: true,
mainFields: ['module', 'import', 'main'],
preferBuiltins: true,
extensions: ['.js', '.json']
}),
typescript(),
commonjs(),
json(),
globals(),
builtins(),
visualizer({
filename: 'bundle-esm-stats.html',
title: 'Cert-Verifier-JS bundle stats',
template: 'sunburst',
open: true,
gzipSize: true
})
]
};