forked from flatpickr/flatpickr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
39 lines (36 loc) · 866 Bytes
/
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
// rollup.config.js
import typescript from 'rollup-plugin-typescript';
import babel from 'rollup-plugin-babel';
import serve from 'rollup-plugin-serve';
import livereload from "rollup-plugin-livereload"
const pkg = require("./package.json");
import path from "path";
export default {
input: './src/index.ts',
output: {
file: 'dist/flatpickr.js',
name: "flatpickr",
format: 'umd',
exports: "default",
banner: `/* flatpickr v${pkg.version}, @license MIT */`
},
plugins: [
typescript({
tsconfig: path.resolve("src/tsconfig.json"),
typescript: require('typescript')
}),
babel({
runtimeHelpers: true
}),
...process.env.ROLLUP_WATCH ? [serve({
open: true,
contentBase: '',
host: '0.0.0.0',
port: 8000,
}),
livereload()] : []
],
watch: {
chokidar: false
}
}