forked from ramda/ramda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
44 lines (38 loc) · 1.03 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
'use strict';
var { babel } = require('@rollup/plugin-babel');
// uglify handles only es5 code, so this also acts as smoke test against shipping es2015+ syntax
var { uglify } = require('rollup-plugin-uglify');
var pkg = require('./package.json');
var banner = '// Ramda v' + pkg.version + '\n'
+ '// https://github.com/ramda/ramda\n'
+ '// (c) 2013-' + new Date().getFullYear() + ' Scott Sauyet, Michael Hurley, and David Chambers\n'
+ '// Ramda may be freely distributed under the MIT license.\n';
var input = 'source/index.js';
var config = {
input: input,
output: {
format: 'umd',
name: 'R',
exports: 'named',
banner: banner
},
plugins: [
babel({
babelHelpers: 'bundled',
presets: [['@babel/preset-env', { targets: { ie: '11' } }]]
})
]
};
if (process.env.NODE_ENV === 'production') {
config.plugins.push(
uglify({
compress: {
pure_getters: true,
unsafe: true,
unsafe_comps: true,
},
warnings: false
})
);
}
module.exports = config;