Skip to content

Commit fa0c756

Browse files
committed
made hackmud preprocessor directive regex more generic
1 parent a78e137 commit fa0c756

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ export async function minifyScript(script: string) {
241241
// preprocessing
242242
script = script
243243
.replace(/function(?: \w+| )?\(/, `function script_${uid}(`)
244-
.replace(/#([fhmln0-4]s|db|G|FMCL|D)\.[\w\.]+\(/g, a => a.replace("#", `_hash_${uid}_`).replace(/\./g, `_dot_${uid}_`))
244+
.replace(/#[\w.]+\(/g, a => a.replace("#", `_hash_${uid}_`).replace(/\./g, `_dot_${uid}_`))
245245

246246
// compilation
247247
script = transpileModule(script, {
@@ -256,7 +256,7 @@ export async function minifyScript(script: string) {
256256
compress: {
257257
keep_fargs: false,
258258
negate_iife: false,
259-
booleans_as_integers: true,
259+
// booleans_as_integers: true,
260260
unsafe_undefined: true,
261261
unsafe_comps: true,
262262
unsafe_proto: true,

0 commit comments

Comments
 (0)