-
Notifications
You must be signed in to change notification settings - Fork 1
/
rollup.config.mjs
38 lines (35 loc) · 981 Bytes
/
rollup.config.mjs
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
import terser from '@rollup/plugin-terser'
import camelCase from 'lodash.camelcase'
const libraryName = 'myra'
const banner = '/** @license MIT https://github.com/jhdrn/myra/blob/master/LICENSE - Copyright (c) 2016-2024 Jonathan Hedrén */'
export default {
input: `build/src/${libraryName}.js`,
output: [
{
file: `dist/${libraryName}.min.js`,
name: camelCase(libraryName),
format: 'umd',
banner,
sourcemap: false,
plugins: [terser()]
},
{
file: `dist/${libraryName}.js`,
name: camelCase(libraryName),
format: 'umd',
banner,
sourcemap: true,
},
{
file: `dist/${libraryName}.mjs`,
name: camelCase(libraryName),
format: 'es',
banner,
sourcemap: true,
}
],
external: [],
watch: {
include: 'build/src/**',
},
}