-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrollup.config.js
31 lines (29 loc) · 920 Bytes
/
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
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import typescript from "@rollup/plugin-typescript";
import json from "@rollup/plugin-json";
import { nodeResolve } from "@rollup/plugin-node-resolve";
const packageJson = require("./package.json");
export default [
{
input: "src/index.ts",
external: ["react", "react-dom","web3",'@gooddollar/goodprotocol/artifacts/contracts/Interfaces.sol/IIdentity.json','@gooddollar/goodprotocol/releases/deployment.json'],
output: [
{
file: packageJson.main,
format: "cjs"
},
{
file: packageJson.module,
format: "es"
},
],
plugins: [
resolve({preferBuiltins: true, mainFields: ['browser']}),
nodeResolve({ extensions: [".ts", ".tsx", ".js"] }),
json(),
commonjs(),
typescript({ tsconfig: "./tsconfig.json" }),
],
},
];