Skip to content

Commit

Permalink
use terser options
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndrsn committed Jan 9, 2025
1 parent 211a202 commit fb838df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/build-site.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ function buildJekyll(path) {
const srcPath = resolvePath('docs/src/code.js');
const targetPath = resolvePath('docs/_site/static/js/code.min.js');
const src = fs.readFileSync(srcPath, { encoding:'utf8' });
const { code, error } = terser.minify(src);
const mangle = { toplevel: true };
const output = { ascii_only: true };
const { code, error } = terser.minify(src, { mangle, output });
if (error) {
if (process.env.BUILD) {
throw error;
Expand Down

0 comments on commit fb838df

Please sign in to comment.