-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.config.js
38 lines (35 loc) · 913 Bytes
/
demo.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
import { nodeResolve } from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import typescript from '@rollup/plugin-typescript';
import livereload from 'rollup-plugin-livereload';
import serve from 'rollup-plugin-serve';
import pkg from './package.json';
const liveReloadOpt = {
watch: ['src', 'demo', 'dist'],
delay: 300,
};
const serveOptions = {
// Launch in browser (default: false)
open: true,
openPage: '/demo/index.html',
port: 8080,
}
export default [
// browser-friendly UMD build
{
input: 'src/index.ts',
output: {
name: 'cytoscape.js-hyse',
file: pkg.browser,
format: 'umd',
exports: 'auto'
},
plugins: [
nodeResolve(), // so Rollup can find `ms`
commonjs(), // so Rollup can convert `ms` to an ES module
typescript(),
serve(serveOptions),
livereload(liveReloadOpt)
]
},
];