-
Notifications
You must be signed in to change notification settings - Fork 3
/
rollup.config.js
37 lines (35 loc) · 919 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
import { terser } from 'rollup-plugin-terser'
import { version } from './package.json'
const banner = '/* efrt ' + version + ' MIT */'
export default [
//cjs
{
input: 'src/index.js',
output: [{ file: 'builds/efrt.cjs', format: 'umd', name: 'efrt' }],
plugins: []
},
// cjs min
{
input: 'src/index.js',
output: [{ file: 'builds/efrt.min.js', format: 'umd', name: 'efrt' }],
plugins: [terser()]
},
// mjs min
{
input: 'src/index.js',
output: [{ banner: banner, file: 'builds/efrt.mjs', format: 'esm' }],
plugins: [terser()]
},
// unpack cjs min
{
input: 'src/unpack/index.js',
output: [{ file: 'builds/efrt-unpack.min.js', format: 'umd', name: 'efrt' }],
plugins: [terser()]
},
// unpack mjs min
{
input: 'src/unpack/index.js',
output: [{ banner: banner, file: 'builds/efrt-unpack.mjs', format: 'esm' }],
plugins: [terser()]
}
]