HookyQR / VSCodeMinify

Add minify function to VSCode 0.10+
53 stars 21 forks source link

Syntax Error: Unexpected token: name (params) #24

Closed Xarkam closed 6 years ago

Xarkam commented 6 years ago

Hello,

I try to minify my code and I receive this laconic error message:

Minify Failed: Syntax Error: Unexpected token: name (params)

How to see log from extension ?

Xarkam commented 6 years ago

Fixed.

Ufligy-js doesn't support es6.

Need to use uglify-es for that.

osotorrio commented 6 years ago

I have the same problem.

Did you include uglify-es in this extension?...or you just used in as a separated tool?

Thanks

Xarkam commented 6 years ago

Hello.

Two possibility, you can install as npm dev dependencie or global package. Next, create a script to call uglify-es (don't forget to have nodejs on your pc) Finally, modify you csproj to add post build process like https://github.com/SOFTINUX/Base/blob/master/src/WebApplication/WebApplication.csproj#L55

In my case, I changed my script to es5 because, we have not many js on application.

Don't forget to configure uglify-es ;)