-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrollup.config.js
46 lines (42 loc) · 969 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
36
37
38
39
40
41
42
43
44
45
46
const resolve = require('rollup-plugin-node-resolve');
const commonjs = require('rollup-plugin-commonjs');
const license = require('rollup-plugin-license');
const json = require('rollup-plugin-json');
const { terser } = require('rollup-plugin-terser');
const globals = require('rollup-plugin-node-globals');
const pkg = require('./package.json');
const OUTPUT_PATH = 'static';
const PLUGINS = [
resolve(),
commonjs(),
json(),
globals(),
terser({
compress: { warnings: false },
output: { comments: false },
mangle: false
}),
license({
banner: `
<%= pkg.name %> v<%= pkg.version %>
Author: Pluggy
Date: <%= moment().format('YYYY-MM-DD') %>
License: MIT
`
})
];
export default [
{
input: 'dist/index.js',
output: [
{
name: 'pluggy',
file: `${OUTPUT_PATH}/pluggy.js`,
format: 'umd',
sourcemap: true,
exports: 'named'
},
],
plugins: PLUGINS
},
];