Josee9988 / MinifyAll

A 𝗩𝗦𝗖𝗼𝗱𝗲 𝗺𝗢𝗻𝗢𝗳𝗢𝗲𝗿 for JS, JSON/C, CSS, and HTML, you will love its simplicity! 🌟 π˜Ύπ™€π™’π™₯π™§π™šπ™¨π™¨ and π™œπ™―π™žπ™₯ files and folders πŸ“¦ Reduce your bundle and file sizes with lightning speed ⚑
https://minifyall.jgracia.es/
GNU General Public License v3.0
71 stars 10 forks source link

Minifying javascript uses _ character for mangling vars #133

Closed BFP-RMP closed 2 years ago

BFP-RMP commented 2 years ago

πŸš€ Enhancement Request

Is your enhancement request related to a problem? Please describe.

Not related to a problem I see. The problem I'm experiencing is that when minifying javascript is will use the character for var mangling, which is causing problems as when it assigns a value to it isn't implemented correct as _ is being treated as an identified in js rather than a variable.

Below is an example of an output when a file has been minified.

let{id:i,description:o,datedue:****}=t,


Describe the solution you'd like

Prevent _ character being an option when mangling.


Describe alternatives you've considered

Add setting option to let user define characters/words to not use when mangling.


Additional context

Being used in VSCode.

welcome[bot] commented 2 years ago

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!

Josee9988 commented 2 years ago

The minimization of JavaScript is done with a 3rd party package called Terser, you may want to post an issue thereafter I update all the packages again, which might solve this issue and other possible ones.

As I said, I will update this third party package and hope that it does fix your issue because it seems like it is not MinifyAll's fault. I will update the package to its newest version and notify you when the new MinifyAll version is available, then you can check if the issue persists, if so, you should notify the Terser team instead also in Github.

Thanks and stay tuned!

Josee9988 commented 2 years ago

Hi, I've successfully updated the terser. You can now download the latest MinifyAll version (2.9.4) and check if your problem persists. Please, let me know ;)

BFP-RMP commented 2 years ago

Hi,

Thanks for the quick update :)

I've updated the extension and the problem remains, so I'll raise an issue with Terser.