Spread operator

When I try to get together in production mode with a maven plugin. I get the following error

[ERROR]
 error: SyntaxError: unknown: Unexpected token (112:10)
[ERROR]
   110 |         const detail = JSON.stringify({
[ERROR]
   111 |           url: upload.url,
[ERROR]
 > 112 |           ...metadata
[ERROR]
       |           ^
[ERROR]
   113 |         });
[ERROR]
   114 |         // remove finished uploads and hide container if empty
[ERROR]
   115 |         setTimeout(() => {
[ERROR]
     at Parser.pp$5.raise (/Users/lesharb/workspace/test/target/node_modules/babylon/lib/index.js:4454:13)
[ERROR]
     at Parser.pp.unexpected (/Users/lesharb/workspace/test/target/node_modules/babylon/lib/index.js:1761:8)
[ERROR]
     at Parser.pp$3.parseIdentifier (/Users/lesharb/workspace/test/target/node_modules/babylon/lib/index.js:4332:10)
[ERROR]
     at Parser.pp$3.parsePropertyName (/Users/lesharb/workspace/test/target/node_modules/babylon/lib/index.js:4156:96)
[ERROR]
     at Parser.pp$3.parseObj (/Users/lesharb/workspace/test/target/node_modules/babylon/lib/index.js:4045:12)
[ERROR]
     at Parser.pp$3.parseExprAtom (/Users/lesharb/workspace/test/target/node_modules/babylon/lib/index.js:3719:19)
[ERROR]
     at Parser.pp$3.parseExprSubscripts (/Users/lesharb/workspace/test/target/node_modules/babylon/lib/index.js:3494:19)
[ERROR]
     at Parser.pp$3.parseMaybeUnary (/Users/lesharb/workspace/test/target/node_modules/babylon/lib/index.js:3474:19)
[ERROR]
     at Parser.pp$3.parseExprOps (/Users/lesharb/workspace/test/target/node_modules/babylon/lib/index.js:3404:19)
[ERROR]
     at Parser.pp$3.parseMaybeConditional (/Users/lesharb/workspace/test/target/node_modules/babylon/lib/index.js:3381:19)

JS code

       console.log(arguments, this);
        const {upload, metadata, uploadComponent} = event.detail;
        const detail = JSON.stringify({
          url: upload.url,
          ...metadata
        });

How can this problem be solved?

Try to update maven to latest version.