M
M
MaksimLav2018-12-14 16:15:19
JavaScript
MaksimLav, 2018-12-14 16:15:19

Why is gulp-plumber throwing an error even though the codepen works?

I use a script to hide text.
it contains a line that causes the gulp-plumber error
nodes.unshift(...node.childNodes);
Where "nodes" is a variable, the plugin itself swears at dots:
5c13ac5095380289014077.jpeg
If the script is included in the html body, everything works fine, if run on a codepen, everything works fine.
All code, line 20:
https://codepen.io/maksimlavrenyuk/pen/ebJwXK
Please tell me what could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
RAX7, 2018-12-14
@MaximLav

gulpUglify doesn't understand spread operator syntax . Use Babel or rewrite the code without using this operator.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question