-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
51 lines (49 loc) · 1.18 KB
/
rollup.config.js
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
// derived from: https://github.com/rollup/rollup-starter-lib/blob/master/rollup.config.js
import resolve from "@rollup/plugin-node-resolve";
import nodePolyfills from "rollup-plugin-node-polyfills";
import commonjs from "@rollup/plugin-commonjs";
import json from "@rollup/plugin-json";
import pkg from "./package.json" assert { type: "json" };
const external = [
"ethers",
"commander",
"@msgpack/msgpack",
"@eth-optimism/sdk",
"@openzeppelin/merkle-tree",
"nft.storage",
"@polysensus/blobcodex",
"@polysensus/chaintrap-contracts",
"@polysensus/diamond-deploy",
"ethereum-cryptography",
];
export default [
/* doesn't work yet
{
input: "cli.js",
output: [
{
inlineDynamicImports: true,
file: pkg.main,
format: "cjs",
},
],
plugins: [
json(),
resolve({ preferBuiltins: true }),
commonjs({ ignoreDynamicRequires: true }),
],
},*/
{
input: "src/lib/index-browser.js",
external,
output: [
{
inlineDynamicImports: true,
file: pkg.module,
format: "es",
sourcemap: true,
},
],
plugins: [json(), resolve(), commonjs(), nodePolyfills()],
},
];