-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathrollup.config.js
More file actions
executable file
·34 lines (32 loc) · 927 Bytes
/
rollup.config.js
File metadata and controls
executable file
·34 lines (32 loc) · 927 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
32
33
34
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import typescript from "@rollup/plugin-typescript";
import peerDepsExternal from "rollup-plugin-peer-deps-external";
const packageJson = require("./package.json");
export default [
{
input: "lib/index.ts",
external: ["react", "react-dom", "react-refresh/runtime", "react-refresh", "'react/jsx-runtime'"],
output: [
{
file: packageJson.main,
format: "cjs",
exports: 'named',
sourcemap: true,
},
{
file: packageJson.module,
format: 'es',
exports: 'named',
sourcemap: true,
},
],
plugins: [
peerDepsExternal(),
resolve(),
commonjs(),
typescript({ tsconfig: "./tsconfig.json" }),
],
external: ["react", "react-dom", "react-refresh/runtime", "react-refresh", "react/jsx-runtime"],
},
];