gulp unable to minify js because of study_sorter.js
JonDevOps opened this issue · comments
I receive the following Error Message after running the "gulp js" or "gulp watch" commands:
GulpUglifyError: unable to minify JavaScript
Caused by: SyntaxError: Unexpected token: keyword «const»
File: /mnt/c/Users/offic/Desktop/workspace/w3develops/js/study_sorter.js
Line: 8
Col: 8
This makes gulp unable to minify the JavaScript.
Yeah, from what I've briefly read it breaks encapsulation so if we can resolve that we should be able to minify. I'm not sure that const is supported during that process. This needs refactored and reworked anyway. It's possible that we could reincorporate js on the html page to include any constants, not sure yet.
Edit to include source: https://stackoverflow.com/questions/45731969/how-to-do-constant-values-minification-in-javascript
Edit 2: It doesn't actually tell you how to do constant values...