-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
35 lines (33 loc) · 884 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
import json from 'rollup-plugin-json';
import resolve from 'rollup-plugin-node-resolve';
import visualizer from 'rollup-plugin-visualizer';
import babel from 'rollup-plugin-babel';
export default {
input: 'main.js',
output: {
file: 'build/libname.js',
format: 'umd',
name: 'libname',
sourcemap: true
},
plugins: [
resolve({
// pass custom options to the resolve plugin
customResolveOptions: {
moduleDirectory: 'node_modules'
}
}),
json({
indent: ' ',
include: 'node_modules/**',
preferConst: true
}),
babel({
exclude: 'node_modules/**' // only transpile our source code
}),
visualizer({
filename: './statistics.html',
sourcemap: true
})
]
}