-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
40 lines (38 loc) · 949 Bytes
/
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
import typescript from "@rollup/plugin-typescript";
import resolve from "@rollup/plugin-node-resolve";
import { terser } from "rollup-plugin-terser";
import copy from "rollup-plugin-copy";
import replace from "@rollup/plugin-replace";
const pkg = require("./package.json");
export default {
input: "src/scripts/App.ts",
output: [
{
file: "dist/scripts/bundle.min.js",
format: "iife",
name: "bundle",
plugins: [terser()],
},
],
plugins: [
replace({
"process.env.DEBUG": "false",
}),
resolve(),
typescript(),
copy({
targets: [
{
src: "src/index.html",
dest: "dist",
transform: (contents) =>
contents.toString().replace(/{{VERSION}}/g, pkg.version),
},
{
src: "node_modules/@fortawesome/fontawesome-free/webfonts/*",
dest: "dist/assets/fontawesome/fonts",
},
],
}),
],
};