S
S
Sergey Kondrashevsky2019-11-15 17:04:19
JavaScript
Sergey Kondrashevsky, 2019-11-15 17:04:19

Why doesn't gulp accept let?

Hey!
I noticed that gulp doesn't run yet and throws an error if I set a variable with let.
Is there any solution?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Igor, 2019-11-15
@Igor_307

use var

B
Brendan Castaneda, 2020-10-18
@ae_ph

In order for uglify-js to support ES2015 + (ES6 +)
You need to install an additional experimental harmony branch

npm install --save-dev [email protected]:mishoo/UglifyJS2#harmony

You don’t need to change anything in gulpfile.js (include it), just install it and everything will work.
All settings in gulp-uglify will be set automatically.
More details uglify-js-es6

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question