-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathrollup.config.js
48 lines (46 loc) · 978 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
40
41
42
43
44
45
46
47
48
const buble = require('rollup-plugin-buble')
const less = require('rollup-plugin-less-loader')
const vue = require('rollup-plugin-vue')
const commonjs = require('rollup-plugin-commonjs')
const bebel = require('rollup-plugin-babel')
const nodeResolve = require('rollup-plugin-node-resolve')
const uglify = require('rollup-plugin-uglify-es')
const plugins = [
vue({
compileTemplate: true
}),
buble({
objectAssign: 'Object.assign',
jsx: 'h'
}),
bebel(),
commonjs()
]
module.exports = [
{
input: 'src/index.js',
output: {
file: 'dist/vue-vaptcha.es.js',
format: 'es'
},
plugins
},
{
input: 'src/index.js',
output: {
file: 'dist/vue-vaptcha.js',
format: 'umd',
name: 'VueVaptcha'
},
plugins: [...plugins]
},
{
input: 'src/index.js',
output: {
file: 'dist/vue-vaptcha.min.js',
format: 'umd',
name: 'VueVaptcha'
},
plugins: [...plugins, uglify()]
}
]