Encountering a minor issue with webpack. The code below is causing an error when I try to build:
pointer.files = {
...pointer.files,
[file]: 1
};
The error message displayed is as follows:
Module build failed: SyntaxError: Unexpected token (84:28)
82 | pointer.files = pointer.files || {};
83 | pointer.files = {
> 84 | ...pointer.files,
| ^
85 | [file]: 1
86 | };
87 | });
I am unfamiliar with the usage of ...
, hence unsure how to resolve this issue. Can someone suggest an alternative syntax or approach that can replace ...
and make the code work?