-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrollup.js
48 lines (43 loc) · 1.25 KB
/
rollup.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
var babel = require('rollup-plugin-babel');
var pkg = require('../package.json');
var version = pkg.version;
var banner =
`/*!
* ${pkg.name} ${version} (https://github.com/jsmini/extend)
* API https://github.com/jsmini/extend/blob/master/doc/api.md
* Copyright 2017-${(new Date).getFullYear()} jsmini. All Rights Reserved
* Licensed under MIT (https://github.com/jsmini/extend/blob/master/LICENSE)
*/
`;
function getCompiler(opt) {
return babel({
babelrc: false,
presets: [
[
'@babel/preset-env',
{
'targets': {
'browsers': 'last 2 versions, > 1%, ie >= 6, Android >= 4, iOS >= 6, and_uc > 9',
'node': '0.10'
},
'modules': false,
'loose': false
}
]
],
plugins: [
[
'@babel/plugin-transform-runtime',
{
'helpers': false,
'regenerator': false
}
]
],
runtimeHelpers: true,
exclude: 'node_modules/**'
});
}
exports.name = 'jsmini_extend';
exports.banner = banner;
exports.getCompiler = getCompiler;