-
Notifications
You must be signed in to change notification settings - Fork 221
Expand file tree
/
Copy pathrollup.config.js
More file actions
48 lines (45 loc) · 1.27 KB
/
rollup.config.js
File metadata and controls
48 lines (45 loc) · 1.27 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
const pkg = require("./package.json");
const today = new Date().toISOString().split("T")[0];
const year = new Date().getFullYear();
const banner = `/*! ${pkg.title || pkg.name} - v${pkg.version} - ${today}
* ${pkg.homepage}
* Copyright (c) ${year} ${pkg.author.name}; Licensed ${pkg.license} */`;
module.exports = [
// UMD build (for browsers and CommonJS)
{
input: "build/rasterizeHTML.concat.js",
output: {
file: "dist/rasterizeHTML.js",
format: "umd",
name: "rasterizeHTML",
banner,
globals: {
url: "url",
xmlserializer: "xmlserializer",
"sane-domparser-error": "sanedomparsererror",
inlineresources: "inlineresources",
},
},
external: [
"url",
"xmlserializer",
"sane-domparser-error",
"inlineresources",
],
},
// ESM build
{
input: "build/rasterizeHTML.concat.js",
output: {
file: "dist/rasterizeHTML.mjs",
format: "es",
banner,
},
external: [
"url",
"xmlserializer",
"sane-domparser-error",
"inlineresources",
],
},
];