From fd5b7ba4ca5da374e49cf2f688a3682b1e030613 Mon Sep 17 00:00:00 2001 From: CanadaHonk <19228318+CanadaHonk@users.noreply.github.com> Date: Tue, 8 Feb 2022 14:10:25 +0000 Subject: [PATCH] [Scripts > Strip] Minify static bools --- scripts/strip.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/strip.js b/scripts/strip.js index 5ec1bc6..d81f894 100644 --- a/scripts/strip.js +++ b/scripts/strip.js @@ -22,6 +22,8 @@ const stripCode = (code) => code .replaceAll('throw ', 'throw#') .replaceAll('async ', 'async#') .replaceAll('else ', 'else#') + .replaceAll('false', '!!0') + .replaceAll('true', '!0') .replace(/((['"`])[\s\S]*?\2)|[ \n]/g, (_, g1) => g1 || '') .replaceAll('#', ' ') .replaceAll('? ?', '??');