-
-
Notifications
You must be signed in to change notification settings - Fork 55
/
rollup.config.js
50 lines (48 loc) · 1.27 KB
/
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
47
48
49
50
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import babel from '@rollup/plugin-babel';
import pkg from './package.json';
const banner = String.raw`/*!
* ____ __ ______ __________ _ _____________ ____________
* / __ \/ / / / __ \/_ __/ __ \ | / / _/ ____/ | / / ____/ __ \
* / /_/ / /_/ / / / / / / / / / / | / // // __/ | | /| / / __/ / /_/ /
* / ____/ __ / /_/ / / / / /_/ /| |/ // // /___ | |/ |/ / /___/ _, _/
* /_/ /_/ /_/\____/ /_/ \____/ |___/___/_____/ |__/|__/_____/_/ |_|
*
* ${pkg.name} - v${pkg.version}
* ${pkg.description}
* ${pkg.homepage}
*
* Copyright (c) 2018-present ${pkg.author}
* Released under ${pkg.license} License
*/
`;
export default [
{
input: 'src/js/photoviewer.js',
output: [
{
name: 'PhotoViewer',
banner,
file: 'dist/photoviewer.js',
format: 'umd'
},
{
file: 'dist/photoviewer.common.js',
banner,
format: 'cjs',
exports: 'auto',
},
{
file: 'dist/photoviewer.esm.js',
banner,
format: 'es'
}
],
plugins: [
babel({ babelHelpers: 'bundled', exclude: 'node_modules/**' }),
commonjs(),
resolve(),
]
}
];