You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.1 KiB
47 lines
1.1 KiB
3 years ago
|
"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' }
|
||
|
|
||
|
|
||
|
};
|