Skip to content

Commit

Permalink
Disabled top-level mangling by default ↞ [auto-sync from `adamlui/js-…
Browse files Browse the repository at this point in the history
…utils`]
  • Loading branch information
adamlui authored and kudo-sync-bot committed Apr 12, 2024
1 parent 11f90d0 commit 537ba56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion node.js/src/minify.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function minify(input, options = {}) {
options = { ...defaultOptions, ...options }; // merge validated options w/ missing default ones

// Minify JS based on input
const minifyOptions = { mangle: options.mangle ? { toplevel: true } : false };
const minifyOptions = { mangle: options.mangle };
if (fs.existsSync(input)) { // minify based on path arg
if (input.endsWith('.js')) { // file path passed
if (options.verbose) console.info(`minify() » Minifying ${ input }...`);
Expand Down

0 comments on commit 537ba56

Please sign in to comment.