baptistebriel / smooth-scrolling

smooth scrolling and parallax effects on scroll
MIT License
613 stars 75 forks source link

Issue building production files with webpack. UglifyJS </3 ES6. #61

Closed jesperlandberg closed 6 years ago

jesperlandberg commented 7 years ago

Hi,

When buidling production files with Webpack I get the following error: "ERROR in static/js/1.c44247249e196963e223.js from UglifyJs Unexpected token: name (Smooth)"

It seem to be an UglifyJS/ES6/packaging issue.

Here is a related link: https://swizec.com/blog/fun-surprise-uglifyjs-cant-es6/swizec/7272

baptistebriel commented 7 years ago

If the error comes from uglifyjs, should we maybe just drop it from the project? I'm fine with it. Or does it comes from the source code? Did you fixed it on your project?

mojereliev commented 7 years ago

It is help for me inside uglifyjs:

mangle: {
  except: ['Smooth']
}