mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 19:42:56 +01:00
Switch to terser
This commit is contained in:
parent
9092951419
commit
4f6fa314b0
3 changed files with 37 additions and 22 deletions
|
|
@ -6,7 +6,7 @@
|
|||
const requirejs = require('requirejs');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const UglifyJS = require('uglify-js');
|
||||
const terser = require('terser');
|
||||
const helpers = require('monaco-plugin-helpers');
|
||||
|
||||
const REPO_ROOT = path.resolve(__dirname, '..');
|
||||
|
|
@ -44,11 +44,7 @@ function bundleOne(moduleId, exclude) {
|
|||
const fileContents = fs.readFileSync(filePath).toString();
|
||||
console.log();
|
||||
console.log(`Minifying ${filePath}...`);
|
||||
const result = UglifyJS.minify(fileContents, {
|
||||
output: {
|
||||
comments: 'some'
|
||||
}
|
||||
});
|
||||
const result = terser.minify(fileContents);
|
||||
console.log(`Done.`);
|
||||
fs.writeFileSync(filePath, BUNDLED_FILE_HEADER + result.code);
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue