-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
41 lines (37 loc) · 1.16 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
import svelte from 'rollup-plugin-svelte';
import alias from '@rollup/plugin-alias';
import resolve from '@rollup/plugin-node-resolve';
import babel from '@rollup/plugin-babel';
import markdown from 'rollup-plugin-md';
import pkg from './package.json';
const name = 'ActiveWidgets.Viewer';
let globals = {
'@activewidgets/options': 'ActiveWidgets.Options'
};
export default {
input: 'viewer/index.js',
output: [
{ file: pkg.module, format: 'es' },
{ file: pkg.main, format: 'umd', globals, name, compact: true }
],
external: Object.keys(globals),
plugins: [
svelte({
emitCss: false
}),
markdown(),
alias({
entries: {
'@activewidgets/examples/data': './data/index.module.js'
}
}),
resolve(),
babel({
babelrc: false,
babelHelpers: 'bundled',
extensions: ['.js', '.mjs', '.html', '.svelte', '.md'],
include: ['viewer/**', 'data/**', 'shared/**', 'node_modules/svelte/**'],
presets: [["@babel/env", {targets: {ie: 11}}]]
}),
]
};