-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
executable file
·62 lines (58 loc) · 1.44 KB
/
rollup.config.js
File metadata and controls
executable file
·62 lines (58 loc) · 1.44 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import babel from 'rollup-plugin-babel';
import postcss from 'rollup-plugin-postcss'
import autoprefixer from 'autoprefixer'
import { uglify } from 'rollup-plugin-uglify';
let pkg = require('./package.json');
const banner =
'/*!\n' +
` * musee.js v${pkg.version}\n` +
` * (c) 2019/${new Date().getMonth() + 1}/${new Date().getDate()} Clear\n` +
' * Released under the MIT License.\n' +
' */'
export default {
input: './src/index.js',
output: [
{
file: 'dist/musee.cjs.js',
format: 'cjs',
banner
},
{
file: './dist/musee.js',
format: 'umd',
name: 'musee',
sourcemap: true,
banner
},
{
file: 'dist/musee.iife.js',
format: 'iife',
name: 'musee',
banner
}
],
plugins: [
babel({
exclude: 'node_modules/**'
}),
resolve({
jsnext: true,
main: true,
browser: true
}),
commonjs({
include: ['umd.js'],
namedExports: {
'umd.js': [ 'Realtime' ]
}
}),
postcss({
autoprefixer,
// minimize: true,
extensions: [ '.css' ],
extract: true
}),
]
}