-
Notifications
You must be signed in to change notification settings - Fork 1
/
rollup.config.mjs
35 lines (33 loc) · 938 Bytes
/
rollup.config.mjs
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
import typescript from "rollup-plugin-typescript2";
import cleanup from "rollup-plugin-cleanup";
import license from "rollup-plugin-license";
import json from "@rollup/plugin-json";
import copy from "rollup-plugin-copy";
import packageJson from "./package.json" with { type: "json" };
import graphql from "@rollup/plugin-graphql";
const plugins = [
graphql(),
typescript(),
json(),
cleanup({ comments: "none", extensions: [".ts"] }),
license({
banner: [
`Name: ${packageJson.name}`,
`Version: ${packageJson.version}`,
`Description: ${packageJson.description}`,
`@see ${packageJson.homepage}`,
].join("\n"),
}),
copy({
targets: [{ src: "src/**/*.html", dest: "dist" }],
}),
];
export default {
input: "src/index.ts",
output: {
file: "dist/index.js",
format: "esm",
},
plugins,
context: "this",
};