forked from alidcast/ency
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
32 lines (31 loc) · 888 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
const replace = require('rollup-plugin-replace')
const resolve = require('rollup-plugin-node-resolve')
const babel = require('rollup-plugin-babel')
const uglify = require('rollup-plugin-uglify')
const filesize = require('rollup-plugin-filesize')
const version = process.env.VERSION || require('./package.json').version
module.exports = {
entry: 'src/index.js',
dest: 'dist/build.js',
format: 'umd',
moduleName: 'Ency',
external (id) { // modules that should remain external
if (/babel-runtime\/.*/i.test(id)) return true
},
plugins: [
replace({ __VERSION__: version }),
babel({
exclude: 'node_modules/**', // only transpile our source code
runtimeHelpers: true
}),
resolve(),
uglify(),
filesize()
],
banner:
`/**
* ency v${version}
* (c) ${new Date().getFullYear()} Alid Castano
* @license MIT
*/`
}