-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrollup.config.js
50 lines (48 loc) · 1.04 KB
/
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
49
50
const resolve = require('rollup-plugin-node-resolve')
const commentjs = require('rollup-plugin-commonjs')
const babel = require('rollup-plugin-babel')
const uglify = require('rollup-plugin-uglify')
const { version, license } = require('./package.json')
let min = process.env.BUILD === 'min'
module.exports = {
entry: 'src/main.js',
dest: `dist/file-dropzone${min ? '.min' : ''}.js`,
format: 'umd',
moduleName: 'FileDropzone',
external: ['jquery'],
globals: {
jquery: 'jQuery'
},
banner: `\
/*
* loopRequest v${version}
* https://github.com/zhanziyang/file-dropzone
*
* Copyright (c) ${new Date().getFullYear()} zhanziyang
* Released under the ${license} license
*/
`,
plugins: [
commentjs(),
resolve(),
babel({
"presets": [
[
"es2015",
{
"modules": false
}
]
],
"plugins": [
"external-helpers"
],
"exclude": "node_modules/**"
}),
(min && uglify({
output: {
comments: /zhanziyang/
}
}))
]
}