-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathrollup.config.js
54 lines (53 loc) · 1.33 KB
/
rollup.config.js
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
import resolve from "@rollup/plugin-node-resolve";
import { terser } from "rollup-plugin-terser";
import html from "@open-wc/rollup-plugin-html";
import replace from "@rollup/plugin-replace";
import strip from "@rollup/plugin-strip";
import copy from "rollup-plugin-copy";
import typescript from "@rollup/plugin-typescript";
import filesize from 'rollup-plugin-filesize';
import minifyHTML from 'rollup-plugin-minify-html-literals';
export default {
input: "build/index.html",
preserveEntrySignatures: 'strict',
output: {
dir: "dist",
format: "es",
},
plugins: [
html(),
resolve(),
filesize(
{
showMinifiedSize: false,
showBrotliSize: true
}
),
minifyHTML(),
replace({
"process.env.NODE_ENV": JSON.stringify(
process.env.NODE_ENV || "production"
),
}),
typescript({
tsconfig: "tsconfig.json"
}),
terser({
ecma: 2020,
module: true,
warnings: true,
}),
strip({
functions: ["console.log"],
}),
copy({
targets: [
{ src: "assets/**/*", dest: "dist/assets/" },
{ src: "styles/**/*", dest: "dist/styles/" },
{ src: "manifest.json", dest: "dist/" },
{ src: "fabric.min.js", dest: "dist/" },
{ src: ".well-known/**/*", dest: "dist/.well-known/"}
],
}),
],
};