question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SyntaxError if used with Webpack and UglifyJs

See original GitHub issue

Version 4.0.0-rc3 throws an SyntaxError if used with Webpack and UglifyJs:

SyntaxError: Unexpected token: name (Event) [../~/reconnecting-websocket/dist/reconnecting-websocket-cjs.js:3,0]

Version 3.2.2 can be used without any errors

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
wenq1commented, Jun 15, 2018

ES6 to ES5 should be done by THIS module (via rollup), rather than by the final app. This changed somehow from 3.2.2 to 4.0-rc.

1reaction
andy12530commented, Jun 6, 2018

same error

Read more comments on GitHub >

github_iconTop Results From Across the Web

UglifyJS webpack plugin throws: Unexpected token: name ...
My recommendation is Babelify to which I switched after having constant errors with Uglify. Edit: The problem might be in your new webpack....
Read more >
How I Fixed: UglifyJs Unexpected token: name (DropIn)
As the error states, the issue is with the UglifyJs plugin, which I use in combination with WebPack. This is a frustrating show-stopping...
Read more >
uglifyjs-webpack-plugin
UglifyJS Webpack Plugin. This plugin uses uglify-js to minify your JavaScript. Requirements. This module requires a minimum of Node v6.9.0 ...
Read more >
UglifyJs error on production build - sage
Copping this error when I go to deploy/build for production. I believe it's an underlying problem with Webpack and Uglify, but just wondering...
Read more >
ERROR in file.js from UglifyJs SyntaxError: Unexpected token
Turns out I had excluded node_modules in the babel loader step, and so the moment date range code, which is written in ES6,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found