I finished the project, and now it's time to build it. I use a template project and still do not fully understand all the npm / webpack stuff that happens under the hood. When starting "npm start" I get an error message:
ERROR in bundle.js from UglifyJs SyntaxError: Unexpected token: punc ()) [bundle.js:848,29]
After an hour of searching the Internet for this issue, I still cannot solve it. In my opinion, this problem occurs because Uglify does not like ES2016 yet. However, the solutions I found on the Internet do not seem to work or do not make enough sense for me.
I found this question https://stackoverflow.com/a/4129609/ and I changed the line webpack in the project.json file of the project:
"webpack": "fulls1z3/webpack#v2.1.0-beta.27-harmony"
But that did not work. Another suggestion is that the forking web package is in my understanding at the moment.
I also tried to run babel in my src folder for another sentence, but that didn't seem to do anything, or I did not start it correctly.
Does anyone have a good solution to this problem? I was pretty stuck at the moment and did not have time to learn npm / webpack from scratch to fully understand what was happening.
Very valuable!
source share