NathanaelA / nativescript-platform-css

A NativeScript plugin to deal with Declarative UI and Platform specific CSS
23 stars 18 forks source link

Webpack with uglify build fails in Angular app #12

Closed manojdcoder closed 6 years ago

manojdcoder commented 6 years ago
ERROR in bundle.js from UglifyJs
Unexpected token: name (deviceInfo) [bundle.js:10558,4]
manojdcoder commented 6 years ago

@NathanaelA I think using let breaks UglifyJs, any idea how to fix that?

manojdcoder commented 6 years ago

This made a fix.

prabudevarrajan1 commented 6 years ago

Hi @manojdcoder, can you please explain more on this fix

manojdcoder commented 6 years ago

There were few plugins I used in my project followed ES6 syntax, Webpack's UglifyJS plugin understands only ES5. I had to install latest version of plugin which understands ES6.

More instructions on the Github repo: https://github.com/webpack-contrib/uglifyjs-webpack-plugin