-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
42 lines (41 loc) · 1.02 KB
/
rollup.config.js
File metadata and controls
42 lines (41 loc) · 1.02 KB
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
import resolve from '@rollup/plugin-node-resolve';
import { babel } from '@rollup/plugin-babel';
import filesize from 'rollup-plugin-filesize';
import del from 'rollup-plugin-delete';
import { terser } from "rollup-plugin-terser";
export default {
input: 'src/scrollspy.js',
output: [
{
file: 'dist/scrollspy.cjs.js',
format: 'cjs',
exports: 'default'
},
{
file: 'dist/scrollspy.esm.js',
format: 'esm',
},
{
file: 'public/scrollspy.min.js',
format: 'umd',
name: 'ScrollSpy'
}
],
plugins: [
del({ targets: ['dist/*', 'public/*'] }),
filesize(),
resolve(),
babel({
exclude: 'node_modules/**'
}),
terser({
compress: {
drop_console: true,
drop_debugger: true,
dead_code: true
},
mangle: true,
keep_classnames: false,
})
]
};