-
Notifications
You must be signed in to change notification settings - Fork 31
/
rollup.config.js
43 lines (40 loc) · 1 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
import copy from "rollup-plugin-copy";
import nodeResolve from "@rollup/plugin-node-resolve";
import typescript from "rollup-plugin-typescript2";
import { terser } from "rollup-plugin-terser";
export default [
{
input: "src/app.ts",
output: {
file: "dist/app.js",
format: "iife",
},
plugins: [
nodeResolve(),
typescript(),
terser({
compress: {
pure_getters: true,
unsafe: true,
unsafe_comps: true,
warnings: false,
},
}),
copy({
targets: [
{ src: "public/*", dest: "dist" },
// Copy WASM resources to public location
{
src: "node_modules/@microblink/blinkid-in-browser-sdk/resources/*",
dest: "dist",
},
// Copy UI resources to public location
{
src: "node_modules/@microblink/blinkid-in-browser-sdk/ui/dist/blinkid-in-browser/",
dest: "dist",
},
],
}),
],
},
];