shellscape / webpack-manifest-plugin

webpack plugin for generating asset manifests
MIT License
1.44k stars 184 forks source link

SyntaxError: Unexpected token ... #193

Closed lhtdesignde closed 5 years ago

lhtdesignde commented 5 years ago

Hi, I just updated to version 2.1.0 and I'm getting this error when building: SyntaxError: Unexpected token ...

My config:

        plugins: [
          new ManifestPlugin({
            fileName: '../../../.js-names.json',
            filter: (file) => !file.path.match(/\.map$|\d-chunk/)
          })
        ],

Guessing it has problems to handle es6 features. Any idea how I could fix this?

mastilver commented 5 years ago

Hi @lhtdesignde

Unfortunatly we dropped support for older node versions (see release note: https://github.com/danethurber/webpack-manifest-plugin/releases/tag/v2.0.0)

Please either pin your version of webpack-manifest-plugin or upgrade your node version

samuelmeuli commented 5 years ago

The release notes don't mention Node 6, which is specified in package.json: https://github.com/danethurber/webpack-manifest-plugin/blob/687e2608b6c48d9ce6f26ce03df02de8db7c5f9b/package.json#L13

mastilver commented 5 years ago

Yep, I just realised, I was looking at array spread...

Indeed object spread is not available until 8.6

lhtdesignde commented 5 years ago

ya I checked the supported node version first since we have some issues already. That explains a lot. Running node 6 here. Thanks! We'll probably update soon anyway

mastilver commented 5 years ago

v2.1.1 released

Thank you @samuelmeuli for the quick fix