forked from sylque/dcs-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
54 lines (50 loc) · 1.13 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
51
52
53
54
// Allow finding Bellhop import from npm package
import resolve from 'rollup-plugin-node-resolve'
// Allows sourcemaps from external libs to be included in output sourcemaps
import sourcemaps from 'rollup-plugin-sourcemaps'
import { terser } from 'rollup-plugin-terser'
const prod = true //process.env.NODE_ENV === 'production'
const sourcemap = prod ? true : 'inline'
const plugins = [resolve(), sourcemaps(), prod && terser({ toplevel: true })]
export default [
{
input: 'src/comToPlugin.js',
output: {
file: 'dist/comToPlugin.js',
format: 'umd',
name: 'window',
extend: true,
sourcemap
},
plugins
},
{
input: 'src/htmlBased.js',
output: {
file: 'dist/htmlBased.js',
format: 'es',
sourcemap
},
plugins
},
{
input: 'src/dcs-html-based.js',
output: {
file: 'dist/dcs-html-based.js',
format: 'iife',
name: 'DcsUnused',
sourcemap
},
plugins
},
{
input: 'src/dcs-decorator.js',
output: {
file: 'dist/dcs-decorator.js',
format: 'iife',
name: 'DcsUnused',
sourcemap
},
plugins
}
]