forked from simonwep/nanopop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.prod.js
39 lines (37 loc) · 918 Bytes
/
rollup.config.prod.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
import {terser} from 'rollup-plugin-terser';
import ts from '@wessberg/rollup-plugin-ts';
import replace from '@rollup/plugin-replace';
import pkg from './package.json';
const banner = `/*! NanoPop ${pkg.version} MIT | https://github.com/Simonwep/nanopop */`;
export default {
input: 'src/NanoPop.ts',
plugins: [
ts(),
terser({
mangle: {
keep_classnames: true,
properties: {
regex: /^_/
}
}
}),
replace({
VERSION: JSON.stringify(pkg.version)
})
],
output: [
{
banner,
file: pkg.main,
name: 'NanoPop',
format: 'umd',
sourcemap: true
},
{
banner,
file: pkg.module,
format: 'es',
sourcemap: true
}
]
};