-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
31 lines (28 loc) · 805 Bytes
/
rollup.config.js
File metadata and controls
31 lines (28 loc) · 805 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
30
31
// rollup.config.js
import commonjs from "@rollup/plugin-commonjs";
import resolve from "@rollup/plugin-node-resolve";
import typescript from "@rollup/plugin-typescript";
import dts from "rollup-plugin-dts";
const extensions = [".js", ".jsx", ".ts", ".tsx"];
export default [
{
input: "src/index.ts",
output: [
{
file: "dist/react-simple-network-graph.cjs",
format: "cjs",
},
{
file: "dist/react-simple-network-graph.js",
format: "es",
},
],
plugins: [commonjs(), typescript(), resolve({ extensions })],
external: ["react", "react-dom", "react/jsx-runtime", "prop-types"],
},
{
input: "dist/dts/index.d.ts",
output: [{ file: "dist/react-simple-network-graph.d.ts", format: "es" }],
plugins: [dts()],
},
];