Answer the question
In order to leave comments, you need to log in
How to fix grunt-contrib-uglify "Unexpected character" error?
When building a project, warning:
>> Uglifying source app/chrome/scripts/shared/common.js failed.
Warning: Uglification failed.
Unexpected character ' ` '.
Line 582 in app/chrome/scripts/shared/common.js
Use --force to continue.
var preloader = `<div id="preload-bar" style="width: 352px; >hello world!</div>`;
grunt.file.defaultEncoding = 'utf-8';
Answer the question
In order to leave comments, you need to log in
Actually you need to convert your es6 code to es5. This can be done by adding grunt tasks such as grunt-es6-transpiler or grunt-babel
And more on es6-tools .
This is an invalid type of quotes. Single ones like this: '
+ you missed one double quote in style
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question