-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.mjs
42 lines (40 loc) · 1 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
import copy from "@axel669/rollup-copy-static"
import $path from "@axel669/rollup-dollar-path"
import commonJS from "@rollup/plugin-commonjs"
import html from "@rollup/plugin-html"
import resolve from "@rollup/plugin-node-resolve"
import terser from "@rollup/plugin-terser"
import del from "rollup-plugin-delete"
import svelte from "rollup-plugin-svelte"
import htmlTemplate from "./html-template.mjs"
export default {
input: "src/main.mjs",
output: {
file: "build/app.js",
format: "esm",
sourcemap: true,
},
plugins: [
del({
targets: "build/*",
}),
$path({
root: "src",
paths: {
$comp: "src/comp",
$state: "src/state",
},
}),
svelte({
emitCss: false,
}),
resolve(),
commonJS(),
html({
fileName: "index.html",
template: htmlTemplate,
}),
copy("static"),
terser(),
],
}