Skip to content

Commit 531bf65

Browse files
committed
chore: streamline rollup config
1 parent 09523fd commit 531bf65

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

rollup.config.js

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,17 @@
11
import dts from "rollup-plugin-dts";
22
import typescript from "@rollup/plugin-typescript";
33

4-
const config = {
4+
export default [
5+
[
6+
typescript({
7+
include: ["src/**/*"],
8+
compilerOptions: { removeComments: true },
9+
}),
10+
],
11+
[dts()],
12+
].map((plugins) => ({
513
input: "src/index.ts",
614
output: [{ dir: "dist", format: "esm" }],
715
external: ["react", "react/jsx-runtime", "react-dom"],
8-
};
9-
10-
export default [
11-
{
12-
...config,
13-
plugins: [
14-
typescript({
15-
include: ["src/**/*"],
16-
compilerOptions: { removeComments: true },
17-
}),
18-
],
19-
},
20-
{
21-
...config,
22-
plugins: [dts()],
23-
},
24-
];
16+
plugins,
17+
}));

0 commit comments

Comments
 (0)