forked from annexare/Countries
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
43 lines (42 loc) · 1.02 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
const json = require('@rollup/plugin-json')
const { babel } = require('@rollup/plugin-babel')
const commonjs = require('@rollup/plugin-commonjs')
const { nodeResolve } = require('@rollup/plugin-node-resolve')
const { terser } = require('rollup-plugin-terser')
const pkg = require('./package.json')
const banner = `/*! ${pkg.name} v${pkg.version} by Annexare | ${pkg.license} */`
module.exports = {
input: 'dist/index.js',
treeshake: true,
output: {
amd: {
id: 'Countries',
},
banner,
file: 'dist/index.es5.min.js',
format: 'umd',
name: 'Countries',
},
plugins: [
json({
compact: true,
}),
nodeResolve(),
commonjs(),
babel({
babelHelpers: 'bundled',
}),
terser({
ecma: 5,
format: {
comments: function (node, comment) {
if (comment.type == 'comment2') {
// multiline comment
return /countries-list|@preserve|@license|@cc_on/i.test(comment.value)
}
},
},
ie8: true,
}),
],
}