-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.ts
29 lines (26 loc) · 990 Bytes
/
rollup.config.ts
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
import { resolve } from "path";
import { defineConfig } from "rollup";
type ResourceExtType = "html" | "ts";
function getPathToResource(name: string, ext: ResourceExtType = "html") {
return resolve("src", "pages", name, `index.${ext}`);
}
export default defineConfig({
input: {
popup: getPathToResource("popup"),
options: getPathToResource("options"),
standalone: getPathToResource("standalone"),
author: getPathToResource("author", "ts"),
background: getPathToResource("background", "ts"),
createWfAemTools: getPathToResource("create-wf-aem-tools", "ts"),
damAdmin: getPathToResource("dam-admin", "ts"),
findReplace: getPathToResource("find-replace", "ts"),
jira: getPathToResource("jira", "ts"),
livePerf: getPathToResource("live-perf", "ts"),
wfPage: getPathToResource("wf-page", "ts"),
},
output: {
entryFileNames: `assets/[name].js`,
chunkFileNames: `assets/[name].js`,
assetFileNames: `assets/[name].[ext]`,
},
});