Use terser instead of uglify
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import typescript from 'rollup-plugin-typescript2';
|
||||
import {uglify} from "rollup-plugin-uglify";
|
||||
import nodeResolve from 'rollup-plugin-node-resolve';
|
||||
import commonjs from 'rollup-plugin-commonjs';
|
||||
import {terser} from "rollup-plugin-terser";
|
||||
|
||||
const pckg = require('./package.json');
|
||||
|
||||
@@ -30,7 +30,7 @@ export default [
|
||||
main: true
|
||||
}),
|
||||
commonjs(),
|
||||
uglify({
|
||||
terser({
|
||||
compress: true,
|
||||
sourcemap: true
|
||||
})
|
||||
@@ -57,14 +57,10 @@ function plugins() {
|
||||
typescript({
|
||||
tsconfig: "tsconfig.json"
|
||||
}),
|
||||
uglify({
|
||||
terser({
|
||||
sourcemap: true,
|
||||
compress: {
|
||||
// hoist_funs: true,
|
||||
// hoist_vars: true,
|
||||
toplevel: true,
|
||||
unsafe: true,
|
||||
dead_code: true,
|
||||
global_defs: {
|
||||
DEBUG: false,
|
||||
VERSION: pckg.version,
|
||||
@@ -76,11 +72,11 @@ function plugins() {
|
||||
properties: {
|
||||
keep_quoted: true,
|
||||
reserved: [
|
||||
"argv", "hrtime",
|
||||
"kotlin_test", "kotlin", "setAdapter", "setAssertHook_4duqou$", "detectAdapter_8be2vx$",
|
||||
"__karma__", "config", "args",
|
||||
"kotlin",
|
||||
"suite", "test",
|
||||
"stack"
|
||||
"setAdapter", "setAssertHook_4duqou$", "detectAdapter_8be2vx$",
|
||||
// TODO: Find why window.__karma__.config.args mangled
|
||||
"args"
|
||||
]
|
||||
},
|
||||
toplevel: true,
|
||||
|
||||
Reference in New Issue
Block a user