howto: enable ES6 compilation?
Some of my scripts are written with ES6 syntax, "let" instead of "var".
let leftLabel = 'hello world';
When I try to start nodebb, using the command:
It will throw the following exception:
[meta/js] Could not compile nodebb.min.js: Unexpected token: name (leftLabel)
Please advise me how to enable ES6 compilation, thanks!
The minifier NodeBB currently uses does not support ES6 compilation, you will need to transpile your code into ES5 using Babel.