-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathrollup.config.mjs
41 lines (39 loc) · 1.12 KB
/
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
36
37
38
39
40
41
import typescript from "@rollup/plugin-typescript";
import { dts } from "rollup-plugin-dts";
import del from "rollup-plugin-delete";
import { nodeResolve } from '@rollup/plugin-node-resolve';
// Modified from: https://gist.github.com/rikkit/b636076740dfaa864ce9ee8ae389b81c#file-tsconfig-json
export default [
{
input: "src/entryPoint.ts",
output: [
{
file: "dist/index.js",
name: "c2mChart",
format: "iife"
}
],
plugins: [typescript({ tsconfig: "./tsconfig.json" }), nodeResolve()]
},
{
input: "src/entryPoint_mjs.ts",
output: [
{
file: "dist/index.mjs",
format: "es"
}
],
plugins: [typescript({ tsconfig: "./tsconfig.json" }), nodeResolve()]
},
{
input: "dist/entryPoint_mjs.d.ts",
output: [
{
file: "dist/index.d.ts",
format: "es",
plugins: []
}
],
plugins: [dts(), del({ targets: "dist/*.d.ts", hook: "buildEnd" })]
}
];