Open rexxon-chuah opened 4 years ago
I just ran into this, but the error window had a very unhelpful Error:0 Stack Empty error.
I don't think your syntax is correct... variables should not be declared in class scope (yet) it should be...
class Person {
constructor(){
this.function1 = () => {
console.log("Hello, I am function1");
}
}
}
or even better
class Person {
function1(){
console.log("Hello, I am function1");
}
}
I have this code that is being minified: const facilityId = vm.selectedFacility.FacilityId; const facilityData = deviceSettingForFacilities[facilityId].value; const record = facilityData.find((({ DeviceId }) => DeviceId === deviceId));
This is the minified code: const r=u.selectedFacility.FacilityId,f=e[r].value,o=f.find({DeviceId:n}=>n===i);
That produces this JavaScript error in Chrome: Uncaught SyntaxError: Malformed arrow function parameter list
In the minified code, adding in the parenthesis around {DeviceId:n}, like this ({DeviceId:n}), makes the error go away. Is there a work-around for this?
maybe ommiting the deconstruction..
const record = facilityData.find(((obj) => obj.DeviceId === deviceId));
or update the bundler minifier to last version, you have to update de extension manually. I don't know why the author do not upload new version to marketplace. http://vsixgallery.com/extension/a0ae318b-4f07-4f71-93cb-f21d3f03c6d3/,
I have the version shown on that page - 3.2.447 - and get the "Error 0" error (if "source map" is enabled on a file), but it's a NuGet package, not an extension.
Installed product versions
Description
Add a JavaScript with the following content:
BunderMinifier failed to minify the above code snippet. However, the minify works when the
function1
is rewritten in normal function syntax.Steps to recreate
Current behavior
Two errors shown in Error List window.
(Bundler & Minifier) Expected '{': => (Bundler & Minifier) Expected '}'
Expected behavior
BundlerMinifier should be able to minify the arrow function.