html-minifier-terser icon indicating copy to clipboard operation
html-minifier-terser copied to clipboard

Can't seem to get to work with Jquery in a file.

Open bad-jesus opened this issue 2 years ago • 3 comments

I keep getting parsing errors when trying to use this on a file with Jquery.

Parse Error: < 0 ? this[ num + this.length ] : this[ num ];

Anyone else running into this?

bad-jesus avatar Jul 26 '22 17:07 bad-jesus

Hi,

thanks for reporting this issue.

Can you please provide a reproducible test case as html file or similar and provide the exact steps to reproduce? You can also test on https://terser.org/html-minifier-terser/

DanielRuf avatar Jul 26 '22 20:07 DanielRuf

Sorry, I should have included more info.

If you copy and paste jquery and try and min it, you get the error.

Screenshot :

@.***

From: Daniel Ruf @.> Sent: Tuesday, July 26, 2022 2:47 PM To: terser/html-minifier-terser @.> Cc: jamie kembel @.>; Author @.> Subject: Re: [terser/html-minifier-terser] Can't seem to get to work with Jquery in a file. (Issue #130)

Please provide a reproducible test case as html file or similar and provide the exact steps to reproduce.

You can test on https://terser.org/html-minifier-terser/

— Reply to this email directly, view it on GitHubhttps://github.com/terser/html-minifier-terser/issues/130#issuecomment-1195963983, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFZZXDVA43M7FDXDHDHHFWTVWBFDDANCNFSM54WY4L2Q. You are receiving this because you authored the thread.Message ID: @.@.>>

bad-jesus avatar Jul 26 '22 20:07 bad-jesus

For me it works there:

Bildschirmfoto 2022-07-26 um 23 36 06

Please make sure to use html files with <script> tags in them, so that html-minifier can compress these blocks with terser. All js compression logic comes from terser directly.

DanielRuf avatar Jul 26 '22 21:07 DanielRuf

Hi Daniel, I tried to set up something to share, but it is rather involved as it is being used as part of a project.

because the file was not being included in an HTML, having the

Thank you for the quick responses though.

Jamie

From: Daniel Ruf @.> Sent: Tuesday, July 26, 2022 3:38 PM To: terser/html-minifier-terser @.> Cc: jamie kembel @.>; Author @.> Subject: Re: [terser/html-minifier-terser] Can't seem to get to work with Jquery in a file. (Issue #130)

For me it works there:

[Bildschirmfoto 2022-07-26 um 23 36 06]https://user-images.githubusercontent.com/827205/181116590-dcedae9a-06f8-484e-afc1-9d9c1837abcb.png

Please make sure to use html files with

— Reply to this email directly, view it on GitHubhttps://github.com/terser/html-minifier-terser/issues/130#issuecomment-1196008265, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFZZXDRP4UEI6GBYO27TQ43VWBLDBANCNFSM54WY4L2Q. You are receiving this because you authored the thread.Message ID: @.@.>>

bad-jesus avatar Oct 11 '22 06:10 bad-jesus