BundlerMinifier
BundlerMinifier copied to clipboard
Cannot Minify lamba with lots of valid bracket types
Installed product versions
- CLI .NET 5.0
Description
This line of code breaks the minifier:
result.data.reduce((a,x) => ({...a, [x.Id]: x}), {});
It doesn't like one or all of those various brackets to the right of the fat arrow.
Gives this output:
Expected ')': ...
Expected ')': ...
Expected ';'
Expected ';'
Expected expression: :
Expected ';'
Expected expression: )
Expected expression: ,
Expected identifier: (
Expected expression: )
Expected ')': }
When not minified everything works, not sure why this isn't supported as it is valid JS.
Steps to recreate
- Minify this
result.data.reduce((a,x) => ({...a, [x.Id]: x}), {});
Current behavior
Fails with the above errors
Expected behavior
Minify the valid line of JS.