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 13 forks source link

Minify on JavaScript doesn't work correctly #76

Closed drodiger closed 3 years ago

drodiger commented 3 years ago

🐞 Bug Report

Describe the bug

If I minify following code:

function jsonPath(obj, expr, arg) {
    var P = {
        resultType: arg && arg.resultType || "VALUE",
        result: [],
        normalize: function (t) {
            var n = [];
            return "test"
        }
    }
}

this is translated on minify to: function jsonPath(n,t,e){e&&e.resultType} Variable P is javascript JSON object, maybe it uses JSON minify, instead of JavaScript minify. Whole file is tagged as JavaScript document, not JSON.

Your environment

Josee9988 commented 3 years ago

Hi! Thanks for posting out! Any JavaScript issue should be added in the Terser's repository. MinifyAll uses their js minifier. The other languages are made by me, but the js minimization comes from Terser.

drodiger commented 3 years ago

Hi! Thanks for posting out! Any JavaScript issue should be added in the Terser's repository. MinifyAll uses their js minifier. The other languages are made by me, but the js minimization comes from Terser.

I will check there. I see they have 134 open issues...

Josee9988 commented 3 years ago

Hi! Thanks for posting out! Any JavaScript issue should be added in the Terser's repository. MinifyAll uses its js minifier. The other languages are made by me, but the js minimization comes from Terser.

I will check there. I see they have 134 open issues...

I know, if they fixed the problem you addressed, then I just have to update their package and update the minifier.

Poke me if it's fixed! Thanks for contributing. I will close this issue meanwhile.