forked from barbosaalr/vuejs-datepicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.js
46 lines (45 loc) · 1.1 KB
/
build.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
42
43
44
45
46
import path from 'path'
import {terser} from 'rollup-plugin-terser'
import vue from 'rollup-plugin-vue'
import babel from 'rollup-plugin-babel'
import postcss from 'rollup-plugin-postcss'
import autoprefixer from 'autoprefixer'
import commonjs from 'rollup-plugin-commonjs'
export default [{
input: path.join(__dirname, '..', 'src', 'components', 'Datepicker.vue'),
output: [
{
file: 'dist/vuejs-datepicker.js',
format: 'umd',
name: 'vuejsDatepicker'
},
{
file: 'dist/vuejs-datepicker.common.js',
format: 'cjs'
},
{
file: 'dist/vuejs-datepicker.esm.js',
format: 'es'
}
],
plugins: [
vue({css: true}),
postcss({plugins: [autoprefixer()]}),
commonjs(),
babel({exclude: 'node_modules/**'})
]
}, {
input: path.join(__dirname, '..', 'src', 'components', 'Datepicker.vue'),
output: {
file: 'dist/vuejs-datepicker.min.js',
format: 'umd',
name: 'vuejsDatepicker'
},
plugins: [
vue({css: true}),
postcss({plugins: [autoprefixer()]}),
commonjs(),
terser(),
babel({exclude: 'node_modules/**'})
]
}]