forked from travist/jsencrypt
-
Notifications
You must be signed in to change notification settings - Fork 2
/
rollup.config.js
46 lines (40 loc) · 1.05 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
"use strict";
const resolve = require('rollup-plugin-node-resolve');
const uglify = require('rollup-plugin-uglify');
const replace = require('rollup-plugin-replace');
const pkg = require('./package.json');
var plugins = [
resolve(),
// uglify({
// mangle: true,
// warnings: true,
// output: {
// beautify: false,
// },
// compress: {
// join_vars: true,
// if_return: true,
// properties: true,
// conditionals: true,
// warnings: true,
// dead_code: true,
// drop_console: true,
// drop_debugger: true,
// }
// }),
replace({
'JSENCRYPT_VERSION': JSON.stringify(pkg.version)
})
];
module.exports = {
input: "./src/index.js",
plugins: plugins,
name: "JSEncrypt",
output: {
file: pkg.main,
format: 'umd',
name: "JSEncrypt",
exports: "named"
},
// { file: pkg.module, format: 'es' }
};