Error while minimizing JS Template with Gulp

0

When running my automatic Gulp tasks, which include JS minification, it's giving error! I created a new JavaScript code that uses templete strings, and the error gives it there! Gulp-uglify can not process this file because of the grave (') accent of the template.

events.js:112
      throw er; // Unhandled 'error' event
      ^
SyntaxError: Unexpected character '''
    at JS_Parse_Error.get (eval at <anonymous> (/var/www/html/portfolio-robson/node_modules/uglify-js/tools/node.js:21:1), <anonymous>:75:23)
    at /var/www/html/portfolio-robson/node_modules/gulp-util/lib/PluginError.js:45:35
    at Array.forEach (<anonymous>)
    at new PluginError (/var/www/html/portfolio-robson/node_modules/gulp-util/lib/PluginError.js:44:8)
    at /var/www/html/portfolio-robson/node_modules/gulp-inline-source/index.js:37:36
    at next (/var/www/html/portfolio-robson/node_modules/inline-source/lib/run.js:25:22)
    at js (/var/www/html/portfolio-robson/node_modules/inline-source/lib/js.js:23:18)
    at next (/var/www/html/portfolio-robson/node_modules/inline-source/lib/run.js:36:33)
    at context.fs.readFile (/var/www/html/portfolio-robson/node_modules/inline-source/lib/load.js:18:16)
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:532:3)
    
asked by anonymous 05.03.2018 / 19:37

0 answers