-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathrollup.config.cjs
83 lines (81 loc) · 2.05 KB
/
rollup.config.cjs
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
const resolve = require("@rollup/plugin-node-resolve");
const commonjs = require("@rollup/plugin-commonjs");
const json = require("@rollup/plugin-json");
const builtins = require("builtin-modules");
const { visualizer } = require("rollup-plugin-visualizer");
const commonConfig = {
plugins: [
resolve({ preferBuiltins: true }),
commonjs(),
json({ compact: true }),
// Generates a stats.html file in the actions folder.
// This is a visual of the Action dependencies for the last Action in the rollup config.
visualizer(),
],
// Do not bundle these packages.
// ethers is required to be bundled as we need v6 and not v5 that is packaged with Defender Actions.
external: [
...builtins,
"axios",
"chai",
/^defender-relay-client(\/.*)?$/,
"@openzeppelin/defender-relay-client/lib/ethers",
"@openzeppelin/defender-sdk",
"@openzeppelin/defender-autotask-client",
"@openzeppelin/defender-kvstore-client",
"@openzeppelin/defender-relay-client/lib/ethers",
"@nomicfoundation/solidity-analyzer-darwin-arm64",
"@nomicfoundation/solidity-analyzer-darwin-x64",
"fsevents",
],
};
module.exports = [
{
input: "autoRequestWithdraw.js",
output: {
file: "dist/autoRequestWithdraw/index.js",
format: "cjs",
},
...commonConfig,
},
{
input: "autoClaimWithdraw.js",
output: {
file: "dist/autoClaimWithdraw/index.js",
format: "cjs",
},
...commonConfig,
},
{
input: "autoRequestLidoWithdraw.js",
output: {
file: "dist/autoRequestLidoWithdraw/index.js",
format: "cjs",
},
...commonConfig,
},
{
input: "autoClaimLidoWithdraw.js",
output: {
file: "dist/autoClaimLidoWithdraw/index.js",
format: "cjs",
},
...commonConfig,
},
{
input: "collectLidoFees.js",
output: {
file: "dist/collectLidoFees/index.js",
format: "cjs",
},
...commonConfig,
},
{
input: "setPrices.js",
output: {
file: "dist/setPrices/index.js",
format: "cjs",
},
...commonConfig,
},
];