-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
56 lines (54 loc) · 1.06 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
55
56
import serve from 'rollup-plugin-serve'
import livereload from 'rollup-plugin-livereload'
import { terser } from 'rollup-plugin-terser'
import html from 'rollup-plugin-html';
import postCss from 'rollup-plugin-postcss';
const minSettings = {
mangle: {
properties: {
regex: /^_/,
},
}
};
export default {
input: 'src/snap-carousel.js',
output: [
{
file: 'docs/snap-carousel.dev.js',
format: 'iife',
plugins: [
livereload({
port: 7746
})
]
},
{
file: 'build/snap-carousel.js',
format: 'iife',
plugins: []
},
{
file: 'build/snap-carousel.min.js',
plugins: [terser(minSettings)]
}
],
format: 'es',
plugins: [
postCss({
inject: false,
minimize: true
}),
html({
include: './src/**/*.html',
htmlMinifierOptions: {
collapseWhitespace: true,
collapseBooleanAttributes: true,
conservativeCollapse: false,
removeComments: true,
}
}),
serve({
contentBase: './docs'
})
]
}