Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minified code with MinifyAll (v2.10.0) in VSCodium (v1.92.1) does not run and deletes console commands #188

Open
sapereaudete opened this issue Aug 26, 2024 · 1 comment
Assignees
Labels
Type: Bug Something isn't working as expected.

Comments

@sapereaudete
Copy link

🐞 Bug Report

Describe the bug

Minified code with MinifyAll (v2.10.0) in VSCodium (v1.92.1) does not run and deletes console commands


Is this a regression?

Use it the first time.


To Reproduce

  1. Install VSCodium (v1.92.1)
  2. Install MinifyAll (v2.10.0)
  3. Create File with the following code: window.onload = function () { ;(({ logging }) => { if (logging === true) { console.clear() } let arr = [], arrSum, kb = document.querySelectorAll('#kurzbemerkt .kb') kb.forEach(k => { arr.push(k.className) }) arrSum = [...new Set(arr)] arrSum.sort().forEach(as => { if (logging === true) { console.log(as.replace('kb ', '')) } }) })({ logging: true }) }
  4. MinifyAll the code
  5. Result: window.onload=function(){(({logging:o})=>{let e,l=[];document.querySelectorAll("#kurzbemerkt .kb").forEach((o=>{l.push(o.className)})),e=[...new Set(l)],e.sort().forEach((o=>{}))})({logging:!0})};
  6. Result does not work and eliminates console commands.
  7. Another minifier like JSCompress does it correctly.

--

Expected behaviour

JSCompress:
window.onload=function(){(({logging:e})=>{!0===e&&console.clear();let l=[],o,c=document.querySelectorAll("#kurzbemerkt .kb");c.forEach(o=>{l.push(o.className)}),o=[...new Set(l)],o.sort().forEach(o=>{!0===e&&console.log(o.replace("kb ",""))})})({logging:!0})};


Media prove


Your environment

openSUSE Leap 15.5
KDE-Plasma-Version: 5.27.9
KDE-Frameworks-Version: 5.103.0
Qt-Version: 5.15.8
Kernel-Version: 5.14.21-150500.55.73-default (64-bit)


Additional context

@sapereaudete sapereaudete added the Type: Bug Something isn't working as expected. label Aug 26, 2024
Copy link

welcome bot commented Aug 26, 2024

Thanks for opening your first issue in Josee9988/project-template! Be sure to follow the issue template and provide every bit of information to help the developers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working as expected.
Projects
None yet
Development

No branches or pull requests

2 participants