forked from DanSnow/vue-recaptcha
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
41 lines (37 loc) · 805 Bytes
/
Copy pathrollup.config.js
File metadata and controls
41 lines (37 loc) · 805 Bytes
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 babel from 'rollup-plugin-babel'
import {terser} from 'rollup-plugin-terser'
const base = {
input: 'src/index.js',
output: {
name: 'VueRecaptcha',
format: 'umd',
file: 'dist/vue-recaptcha.js',
exports: 'default'
},
plugins: [
babel({
babelrc: false,
presets: [['@babel/preset-env', {modules: false, loose: true}]],
plugins: [['@babel/plugin-proposal-object-rest-spread', {loose: true}]],
exclude: 'node_modules/**'
})
]
}
const minify = {
...base,
output: {
...base.output,
format: 'umd',
file: 'dist/vue-recaptcha.min.js'
},
plugins: [...base.plugins, terser()]
}
const es = {
...base,
output: {
...base.output,
format: 'es',
file: 'dist/vue-recaptcha.es.js'
}
}
export default [base, minify, es]