forked from oct16/TimeCat
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrollup.config.dev.js
35 lines (33 loc) · 991 Bytes
/
rollup.config.dev.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
import ts from 'rollup-plugin-typescript2'
import html from '@rollup/plugin-html'
import node from 'rollup-plugin-node-resolve'
import sourcemaps from 'rollup-plugin-sourcemaps'
import browsersync from 'rollup-plugin-browsersync'
import fs from 'fs'
import { string } from 'rollup-plugin-string'
export default {
input: 'index.ts',
output: {
name: 'wr',
format: 'esm',
file: 'dist/replay.esm.js',
sourcemap: true
},
plugins: [
ts(),
node(),
sourcemaps(),
html({
template: () => fs.readFileSync('examples/todo.html')
}),
html({
fileName: 'replay.html',
template: () => fs.readFileSync('assets/template.html')
}),
string({
include: ['**/*.html', '**/*.css'],
exclude: ['**/index.html', '**/index.css']
}),
browsersync({ codeSync: false, server: 'dist', port: 4321, notify: false, open: false })
]
}