Use official terser plugin for Rollup (#3674)

This commit is contained in:
Jon Koops 2022-10-31 13:47:30 +01:00 committed by GitHub
parent 508e367670
commit 680938b8b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 42 additions and 56 deletions

View file

@ -37,10 +37,10 @@
"@rollup/plugin-commonjs": "^23.0.2", "@rollup/plugin-commonjs": "^23.0.2",
"@rollup/plugin-inject": "^5.0.2", "@rollup/plugin-inject": "^5.0.2",
"@rollup/plugin-node-resolve": "^15.0.1", "@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-terser": "^0.1.0",
"@rollup/plugin-typescript": "^9.0.2", "@rollup/plugin-typescript": "^9.0.2",
"es6-promise": "^4.2.8", "es6-promise": "^4.2.8",
"rollup": "^3.2.3", "rollup": "^3.2.3"
"rollup-plugin-terser": "^7.0.2"
}, },
"dependencies": { "dependencies": {
"base64-js": "^1.5.1", "base64-js": "^1.5.1",

View file

@ -1,10 +1,10 @@
import commonjs from "@rollup/plugin-commonjs"; import commonjs from "@rollup/plugin-commonjs";
import inject from "@rollup/plugin-inject"; import inject from "@rollup/plugin-inject";
import { nodeResolve } from "@rollup/plugin-node-resolve"; import { nodeResolve } from "@rollup/plugin-node-resolve";
import terser from '@rollup/plugin-terser';
import path from "node:path"; import path from "node:path";
import type { OutputOptions, RollupOptions } from "rollup"; import type { OutputOptions, RollupOptions } from "rollup";
import { defineConfig } from "rollup"; import { defineConfig } from "rollup";
import { terser } from "rollup-plugin-terser";
interface DefineOptionsArgs { interface DefineOptionsArgs {
file: string; file: string;

92
package-lock.json generated
View file

@ -365,10 +365,10 @@
"@rollup/plugin-commonjs": "^23.0.2", "@rollup/plugin-commonjs": "^23.0.2",
"@rollup/plugin-inject": "^5.0.2", "@rollup/plugin-inject": "^5.0.2",
"@rollup/plugin-node-resolve": "^15.0.1", "@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-terser": "^0.1.0",
"@rollup/plugin-typescript": "^9.0.2", "@rollup/plugin-typescript": "^9.0.2",
"es6-promise": "^4.2.8", "es6-promise": "^4.2.8",
"rollup": "^3.2.3", "rollup": "^3.2.3"
"rollup-plugin-terser": "^7.0.2"
} }
}, },
"libs/keycloak-js/node_modules/rollup": { "libs/keycloak-js/node_modules/rollup": {
@ -3683,6 +3683,26 @@
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
}, },
"node_modules/@rollup/plugin-terser": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.1.0.tgz",
"integrity": "sha512-N2KK+qUfHX2hBzVzM41UWGLrEmcjVC37spC8R3c9mt3oEDFKh3N2e12/lLp9aVSt86veR0TQiCNQXrm8C6aiUQ==",
"dev": true,
"dependencies": {
"terser": "^5.15.1"
},
"engines": {
"node": ">=14.0.0"
},
"peerDependencies": {
"rollup": "^2.x || ^3.x"
},
"peerDependenciesMeta": {
"rollup": {
"optional": true
}
}
},
"node_modules/@rollup/plugin-typescript": { "node_modules/@rollup/plugin-typescript": {
"version": "9.0.2", "version": "9.0.2",
"resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-9.0.2.tgz", "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-9.0.2.tgz",
@ -10058,19 +10078,6 @@
"node": "^14.15.0 || ^16.10.0 || >=18.0.0" "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
} }
}, },
"node_modules/jest-worker": {
"version": "26.6.2",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/node": "*",
"merge-stream": "^2.0.0",
"supports-color": "^7.0.0"
},
"engines": {
"node": ">= 10.13.0"
}
},
"node_modules/js-sdsl": { "node_modules/js-sdsl": {
"version": "4.1.4", "version": "4.1.4",
"dev": true, "dev": true,
@ -12602,20 +12609,6 @@
"fsevents": "~2.3.2" "fsevents": "~2.3.2"
} }
}, },
"node_modules/rollup-plugin-terser": {
"version": "7.0.2",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/code-frame": "^7.10.4",
"jest-worker": "^26.2.1",
"serialize-javascript": "^4.0.0",
"terser": "^5.0.0"
},
"peerDependencies": {
"rollup": "^2.0.0"
}
},
"node_modules/run-parallel": { "node_modules/run-parallel": {
"version": "1.2.0", "version": "1.2.0",
"dev": true, "dev": true,
@ -13599,9 +13592,10 @@
} }
}, },
"node_modules/terser": { "node_modules/terser": {
"version": "5.15.0", "version": "5.15.1",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.15.1.tgz",
"integrity": "sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw==",
"dev": true, "dev": true,
"license": "BSD-2-Clause",
"dependencies": { "dependencies": {
"@jridgewell/source-map": "^0.3.2", "@jridgewell/source-map": "^0.3.2",
"acorn": "^8.5.0", "acorn": "^8.5.0",
@ -17454,6 +17448,15 @@
} }
} }
}, },
"@rollup/plugin-terser": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.1.0.tgz",
"integrity": "sha512-N2KK+qUfHX2hBzVzM41UWGLrEmcjVC37spC8R3c9mt3oEDFKh3N2e12/lLp9aVSt86veR0TQiCNQXrm8C6aiUQ==",
"dev": true,
"requires": {
"terser": "^5.15.1"
}
},
"@rollup/plugin-typescript": { "@rollup/plugin-typescript": {
"version": "9.0.2", "version": "9.0.2",
"resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-9.0.2.tgz", "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-9.0.2.tgz",
@ -21823,15 +21826,6 @@
"picomatch": "^2.2.3" "picomatch": "^2.2.3"
} }
}, },
"jest-worker": {
"version": "26.6.2",
"dev": true,
"requires": {
"@types/node": "*",
"merge-stream": "^2.0.0",
"supports-color": "^7.0.0"
}
},
"js-sdsl": { "js-sdsl": {
"version": "4.1.4", "version": "4.1.4",
"dev": true "dev": true
@ -21973,12 +21967,12 @@
"@rollup/plugin-commonjs": "^23.0.2", "@rollup/plugin-commonjs": "^23.0.2",
"@rollup/plugin-inject": "^5.0.2", "@rollup/plugin-inject": "^5.0.2",
"@rollup/plugin-node-resolve": "^15.0.1", "@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-terser": "*",
"@rollup/plugin-typescript": "^9.0.2", "@rollup/plugin-typescript": "^9.0.2",
"base64-js": "^1.5.1", "base64-js": "^1.5.1",
"es6-promise": "^4.2.8", "es6-promise": "^4.2.8",
"js-sha256": "^0.9.0", "js-sha256": "^0.9.0",
"rollup": "^3.2.3", "rollup": "^3.2.3"
"rollup-plugin-terser": "^7.0.2"
}, },
"dependencies": { "dependencies": {
"rollup": { "rollup": {
@ -23522,16 +23516,6 @@
"fsevents": "~2.3.2" "fsevents": "~2.3.2"
} }
}, },
"rollup-plugin-terser": {
"version": "7.0.2",
"dev": true,
"requires": {
"@babel/code-frame": "^7.10.4",
"jest-worker": "^26.2.1",
"serialize-javascript": "^4.0.0",
"terser": "^5.0.0"
}
},
"run-parallel": { "run-parallel": {
"version": "1.2.0", "version": "1.2.0",
"dev": true, "dev": true,
@ -24204,7 +24188,9 @@
} }
}, },
"terser": { "terser": {
"version": "5.15.0", "version": "5.15.1",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.15.1.tgz",
"integrity": "sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@jridgewell/source-map": "^0.3.2", "@jridgewell/source-map": "^0.3.2",