J2V8
J2V8 copied to clipboard
The New version of J2V8(Android) can not support ES6 Import/Export function.....
import * from './function'; function aaa(){ for(let i=1;i<100;i++){ System.println("锟斤拷锟?====="+i); } return 0; } var a=System.getScreenResolution(); System.println("Screen======"+a); aaa();
undefined:2: SyntaxError: Unexpected token import import * from './function'; ^^^^^^
Not even the latests node supports es6 modules yet, and it will probably take a while. You will need to transpile your code before running it anywhere in node.
Actually an earlier version of V8 supported es6 modules with a flag but it got removed. That might be the cause of this problem.
Does it support ES6 now?
Does it support ES6 now?
@Gaubee yes, the current version of V8 supports most of ES6 features
latest v8 version support es module,plz add it to j2v8