8000 After using minify to compress JS, the code reports an error: uncaught syntax error: unexpected token ' · Issue #339 · tdewolff/minify · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content 8000
After using minify to compress JS, the code reports an error: uncaught syntax error: unexpected token ' #339
Closed
@LiuJun0

Description

@LiuJun0

chrome console error

Uncaught SyntaxError: Unexpected token '.'
app.f08b896.js:1 Error: Loading chunk 3 failed.
    at HTMLScriptElement.i (manifest.7941de6.js:1)

After compress Error code

f>.e-9&&(a.width+=b/f,a.height+=b/f,a.x-=b/f/2,a.y-=b/f/2)),a):c}

I use nodejs uglifyjs, which has no errors

I found the source code and tested compression

function test() {
    var m = this.transform; // Get the line scale.
    // Determinant of `m` means how much the area is enlarged by the
    // transformation. So its square root can be used as a scale factor
    // for width.

    return m && abs(m[0] - 1) > 1e-10 && abs(m[3] - 1) > 1e-10 ? Math.sqrt(abs(m[0] * m[3] - m[2] * m[1])) : 1;
}

After compression

function test(){var m=this.transform;return m&&abs(m[0]-1)>.e-9&&abs(m[3]-1)>.e-9?Math.sqrt(abs(m[0]*m[3]-m[2]*m[1])):1}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0