I am trying to optimize Create-react-app for production using following command:
npm run build
But it is giving me following error:
static/js/main.9c091e05.js from UglifyJs
SyntaxError: Unexpected token: operator (>) [./~/http-build-query/index.js:16,0]
That might be because of module http-build-query but that module is too necessary for my app.
I have also tried yarn build and that is also giving me same error.
EDIT
I just knew by googling that ES6 syntax is not supported by npm run build. So the question is how to build ES6 syntax with npm run build ?