-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathrollup.config.js
More file actions
36 lines (35 loc) · 764 Bytes
/
rollup.config.js
File metadata and controls
36 lines (35 loc) · 764 Bytes
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
const resolve = require('@rollup/plugin-node-resolve');
const commonjs = require('@rollup/plugin-commonjs');
const babel = require('@rollup/plugin-babel');
const terser = require('@rollup/plugin-terser');
const pkg = require('./package.json');
module.exports = [
{
input: './sticky-events.js',
output: {
name: 'stickyEvents',
file: pkg.browser,
format: 'umd',
},
plugins: [
babel({
exclude: 'node_modules/**',
}),
resolve(),
commonjs(),
terser(),
]
},
{
input: './sticky-events.js',
output: [
{ file: pkg.main, format: 'cjs' },
{ file: pkg.module, format: 'es' },
],
plugins: [
babel({
exclude: 'node_modules/**',
}),
],
},
];