Using ecma6
10 June 2017 22:28
11 June 2017 12:33
Ok I found it. It turned out that blend4web uses the Google Closure Compiler, and the
However I guess it is not wise to change this parameter, because all of the b4w modules are written in es5. So It can effect their optimization badly. So I will transpile my code to es5.
–language_in
parameter hardcoded in scripts/lib/project_cli.py— a/scripts/lib/project_cli.py
+++ b/scripts/lib/project_cli.py
@@ -348,7 +348,7 @@ def fill_global_paths(base_dir):
# closure compiler params
_js_cc_params = [_java_exec, "-jar", js_cc_path,
- "–language_in=ECMASCRIPT5"]
+ "–language_in=ECMASCRIPT6"]
# engine sources directory
_src_dir = join(base_dir, "src")
However I guess it is not wise to change this parameter, because all of the b4w modules are written in es5. So It can effect their optimization badly. So I will transpile my code to es5.