I want to use ES6 at both: client and server side. Of course, I can launch my NodeJS server from terminal like babel-node src/app.js, but it makes it impossible
Finally I found the answer here. I did npm install babel and add require('babel/register') at the beginning of my main node file (app.js).
Now I really can launch/debug Node app written with ES6 from Webstorm. But that debugging is something very strange - looks like code that worked before doesn't work know. The Intellij debuger says all my variables are undefined. Also there is an article about another possible problems.
Example:
What is supper fancy about it that inside loop for (var i = 1; i < trs.length; i++) { variable i considered undefined!