forked from ava-labs/avalanchejs
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrollup.config.mjs
More file actions
29 lines (28 loc) · 828 Bytes
/
rollup.config.mjs
File metadata and controls
29 lines (28 loc) · 828 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
import { nodeResolve } from '@rollup/plugin-node-resolve';
import filesize from 'rollup-plugin-filesize';
import typescript from '@rollup/plugin-typescript';
import terser from '@rollup/plugin-terser';
export default {
input: './src/index.ts',
external: [
'@noble/hashes/ripemd160',
'@noble/hashes/sha256',
'@noble/hashes/utils',
'@scure/base',
], // we don't want these dependencies bundled in the dist folder
output: [
{
file: 'dist/index.cjs',
format: 'cjs',
plugins: [terser()],
sourcemap: process.env.BUILD === 'production' ? false : true,
},
{
file: 'dist/es/index.js',
format: 'esm',
plugins: [terser()],
sourcemap: process.env.BUILD === 'production' ? false : true,
},
],
plugins: [filesize(), nodeResolve(), typescript()],
};