-
-
Notifications
You must be signed in to change notification settings - Fork 90
/
rollup.app.config.js
47 lines (46 loc) · 1023 Bytes
/
rollup.app.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
import { terser } from 'rollup-plugin-terser';
import minifyHTML from 'rollup-plugin-minify-html-literals';
import replace from '@rollup/plugin-replace';
export default {
input: 'src/index.js',
output: {
file: 'dist/app/index.js',
format: 'iife',
plugins: [
terser({
mangle: {
keep_classnames: false,
keep_fnames: false,
properties: {
regex: /^_/
}
}
})]
},
plugins: [
minifyHTML({
options: {
shouldMinify(template) {
return (
template.parts.some(part => {
return (
part.text.includes('<style') ||
part.text.includes('<div') ||
part.text.includes('<circle') ||
part.text.includes('<path') ||
part.text.includes('<svg')
);
})
);
},
minifyOptions: {
collapseWhitespace: true,
minifyCSS: true,
removeComments: true,
keepClosingSlash: true
}
}
}),
replace({ preventAssignment: true, 'https://localhost:7156/api': 'https://dgrm.boyko.tech/api' })
]
};