mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 16:36:15 -04:00
stale code: use terser instead of uglify
This commit is contained in:
parent
166e1371da
commit
f1e3aff72f
4 changed files with 28 additions and 13 deletions
|
@ -376,7 +376,7 @@ function getFileCompressed(filename, contentType, callback) {
|
|||
const compressResult = await compressJS(content);
|
||||
|
||||
if (compressResult.error) {
|
||||
console.error(`Error compressing JS (${filename}) using UglifyJS`, compressResult.error);
|
||||
console.error(`Error compressing JS (${filename}) using terser`, compressResult.error);
|
||||
} else {
|
||||
content = compressResult.code.toString(); // Convert content obj code to string
|
||||
}
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
*/
|
||||
|
||||
var CleanCSS = require('clean-css');
|
||||
var uglifyJS = require("uglify-js");
|
||||
var Terser = require("terser");
|
||||
var path = require('path');
|
||||
var Threads = require('threads')
|
||||
|
||||
function compressJS(content)
|
||||
{
|
||||
return uglifyJS.minify(content);
|
||||
return Terser.minify(content);
|
||||
}
|
||||
|
||||
function compressCSS(filename, ROOT_DIR)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue