-
Notifications
You must be signed in to change notification settings - Fork 13
/
rollup.config.js
49 lines (48 loc) · 955 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
38
39
40
41
42
43
44
45
46
47
48
49
import resolve from 'rollup-plugin-node-resolve';
import typescript from 'rollup-plugin-typescript'
export default {
input: 'src/index.ts',
output: [
{
format: "amd",
file: "lib/bundle.amd.js"
},
{
format: "cjs",
file: "lib/bundle.cjs.js"
},
{
format: "es",
file: "lib/bundle.esm.js"
},
{
file: 'lib/bundle.umd.js',
format: 'umd',
name: 'EmlParseJs',
globals: {
'js-base64': 'Base64',
'@sinonjs/text-encoding': 'self'
}
},
{
format: "iife",
file: "lib/bundle.iife.js",
globals: {
'js-base64': 'Base64 || (window || this).Base64',
'@sinonjs/text-encoding': `{
TextEncoder: (window || this)['TextEncoder'],
TextDecoder: (window || this)['TextDecoder'],
}`,
}
},
],
plugins: [
typescript(),
resolve({
customResolveOptions: {
moduleDirectory: 'node_modules'
}
})
],
external: ['js-base64', '@sinonjs/text-encoding']
};