-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrollup.config.mjs
44 lines (42 loc) · 1.13 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
42
43
44
import babel from "@rollup/plugin-babel";
import commonjs from "@rollup/plugin-commonjs";
import json from "@rollup/plugin-json";
import resolve from "@rollup/plugin-node-resolve";
import filesize from "rollup-plugin-filesize";
import {terser} from "rollup-plugin-terser";
import copy from "rollup-plugin-copy";
export default {
input: "./src/main.ts",
output: {
dir: "./dist",
format: "cjs",
sourcemap: true,
exports: "auto",
},
plugins: [
json(),
resolve({
preferBuiltins: true,
extensions: [".ts", ".mjs", ".js", ".json", ".node"],
}),
babel({
configFile: "./babel.config.js",
extensions: [".ts"],
babelHelpers: "bundled",
exclude: "node_modules/**", // only transpile our source code
}),
commonjs({
sourceMap: false,
}),
terser(),
filesize(),
copy({
targets: [
{
src: "./src/checksync.schema.json",
dest: "./dist",
},
],
}),
],
};