madskristensen / BundlerMinifier

Visual Studio extension
Other
614 stars 172 forks source link

Bundling error #524

Open clarghi opened 3 years ago

clarghi commented 3 years ago

Installed product versions

Description

Seems that doesn't work correctly with parameters with default values in some circumstances.

Steps to recreate

Simply create a javascript file as this and minify. The result contains wrong javascript code.

var test={}; test.subNameSpace={ failureTesting:() => { var sub=(info=false) => { console.log("ok "+info) }; sub(true); } } window.onload=function() { test.subNameSpace.failureTesting(); }

The result start with:

var test={};test.subNameSpace={failureTesting:()=>{var n=n=false=>{console.log

As you can see, "var n=n=false=>" is wrong. Any idea on how to fix this? B.r. Cristiano Larghi

clarghi commented 3 years ago

I think this is related to NUglify, so I have opened an issue:

https://github.com/trullock/NUglify/issues/208

trullock commented 3 years ago

This project looks to be using an ancient version of NUglify

<PackageReference Include="NUglify" Version="1.9.1" PrivateAssets="All" />

It needs updating to latest