-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathrollup.config.js
More file actions
63 lines (61 loc) · 1.25 KB
/
rollup.config.js
File metadata and controls
63 lines (61 loc) · 1.25 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import {createRequire} from "node:module";
const require = createRequire(import.meta.url);
const pkg = require("./package.json");
const year = new Date().getFullYear();
const bannerLong = `/**
* ${pkg.name}
*
* @copyright ${year} ${pkg.author}
* @license ${pkg.license}
* @version ${pkg.version}
*/`;
const defaultOutBase = {compact: true, banner: bannerLong, name: pkg.name};
const cjOutBase = {...defaultOutBase, compact: false, format: "cjs", exports: "named"};
const esmOutBase = {...defaultOutBase, format: "esm"};
export default [
{
input: `./src/${pkg.name}.js`,
output: [
{
...cjOutBase,
file: `dist/${pkg.name}.cjs`
},
{
...esmOutBase,
file: `dist/${pkg.name}.js`
}
],
external: [
"node:crypto",
"node:fs",
"node:module",
"node:path",
"node:url",
"woodland",
"tiny-eventsource",
"node:http",
"node:https",
"tiny-coerce",
"yamljs",
"url",
"keysort",
"cookie-parser",
"redis",
"express-session",
"passport",
"passport-http",
"passport-http-bearer",
"passport-local",
"passport-oauth2",
"passport-jwt",
"ioredis",
"csv-stringify/sync",
"fast-xml-parser",
"tiny-jsonl",
"helmet",
"connect-redis",
"tiny-merge",
"express-prom-bundle"
]
}
];