-
-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathrollup.config.dev.js
More file actions
26 lines (24 loc) · 746 Bytes
/
rollup.config.dev.js
File metadata and controls
26 lines (24 loc) · 746 Bytes
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
import commoncfg from './rollup.config.common';
import serve from 'rollup-plugin-serve';
import livereload from 'rollup-plugin-livereload';
import copy from 'rollup-plugin-cpy';
import staticSite from 'rollup-plugin-static-site';
commoncfg[0].plugins.push(
staticSite({
template: { path: 'src/dev-assets/template.html' },
dir: 'dist'
}),
copy({
files: ['src/dev-assets/*.jpg'],
dest: 'dist'
}),
serve('dist'),
livereload()
);
// only generate UMD during dev
commoncfg[0].output.splice(0, 1);
// workaround for terser plugin bug with multiple outputs
// https://github.com/TrySound/rollup-plugin-terser/issues/5
// don't need double inputs in dev
commoncfg.pop();
export default commoncfg;