-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.mjs
More file actions
44 lines (42 loc) · 1.12 KB
/
rollup.config.mjs
File metadata and controls
44 lines (42 loc) · 1.12 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
import typescript from 'rollup-plugin-typescript2';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
import pkg from './package.json' assert { type: 'json' };
// import tsconfig from './tsconfig.json' assert { type: 'json' };
export default [
{
input: 'src/index.ts',
output: [
{
file: 'dist/index.cjs.js',
format: 'cjs',
sourcemap: true,
},
{
file: 'dist/index.esm.js',
format: 'esm',
sourcemap: true,
},
],
plugins: [
json({}),
resolve(),
commonjs(),
typescript({
declaration: false, // Ensure Rollup does not emit declaration files
}),
],
external: [
...Object.keys(pkg.dependencies || {}),
"ethersv5",
"ethersv6"
], // Don't pack all dependencies that are in package.json
onwarn: (warning, warn) => {
// Ignore the "this is undefined" warning for aes-js
if (warning.code === 'THIS_IS_UNDEFINED' && /aes-js/.test(warning.message))
return;
warn(warning);
}
},
];