forked from super-ienien/percent-round
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
43 lines (41 loc) · 963 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
import {terser} from 'rollup-plugin-terser';
import license from 'rollup-plugin-license';
const licensePlugin = license({
sourcemap: true,
banner: {
content:
`
<%= pkg.name %>
Generated: <%= moment().format('YYYY-MM-DD') %>
Version: <%= pkg.version %>
Copyright 2020 Vivien Anglesio
License : MIT
`,
data()
{
return {
foo: 'foo',
};
},
},
})
export default {
input: 'src/index.js',
output: [{
file: 'dist/percent-round.js',
format: 'umd',
name: 'percentRound',
plugins: [licensePlugin],
},
{
file: 'dist/percent-round.min.js',
format: 'umd',
name: 'percentRound',
plugins: [terser(), licensePlugin]
},
{
file: 'dist/percent-round.esm.js',
format: 'es',
plugins: [licensePlugin],
}]
};