forked from barbosaalr/vuejs-datepicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserve.js
41 lines (40 loc) · 1023 Bytes
/
serve.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 path from 'path'
import serve from 'rollup-plugin-serve'
import livereload from 'rollup-plugin-livereload'
import vue from 'rollup-plugin-vue'
import babel from 'rollup-plugin-babel'
import resolve from 'rollup-plugin-node-resolve'
import replace from 'rollup-plugin-replace'
import common from 'rollup-plugin-commonjs'
export default {
input: path.join(__dirname, '..', 'example', 'main.js'),
output: {
file: path.join(__dirname, '..', 'example', 'demo.js'),
format: 'iife',
name: 'demo',
sourcemap: true
},
plugins: [
vue({
css: true
}),
replace({
'process.env.NODE_ENV': JSON.stringify('development')
}),
resolve({
mainFields: ['module', 'main']
}),
common(),
babel({exclude: 'node_modules/**'}),
serve({
open: true,
contentBase: path.join(__dirname, '..', 'example'),
host: 'localhost',
port: 10001
}),
livereload({
verbose: true,
watch: path.join(__dirname, '..', 'example')
})
]
}