You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Does the version ( j2v8 4.7.1 for linux) support ES6 import, new features? #279
It builds on V8 version 5.4.500.45. I don't know if this version supports import. If anyone has some time to try this out and post the answer, that would be greatly appreciated.
I just tested it, and unfortunately the answer is no.
@Test
public void testImport() {
String jsCode = "import * as foo from './foo'\n"
+ "let y = foo.square(5);\n"
+ "y;";
System.out.println(v8.executeIntegerScript(jsCode));
}
This fails with a compilation error on the symbol import. I also found this while searching the issue, which appears to state that import / module support is not yet available in V8 5.4.
As I've often said, we are bug for bug, feature for feature compatible with V8. We can do as much as V8, but no more.
Activity
matiwinnetou commentedon Jun 15, 2017
It uses node 7.4.0 so one needs to check what exact;y V8 version is in this nodejs version.
irbull commentedon Jun 15, 2017
It builds on V8 version
5.4.500.45. I don't know if this version supports import. If anyone has some time to try this out and post the answer, that would be greatly appreciated.matiwinnetou commentedon Jun 18, 2017
I am pretty sure: v8 5.4.x does support ES6 imports, in version 6 they already focus on rest spread operator... (kinda ES7)
https://v8project.blogspot.de/
irbull commentedon Jun 19, 2017
I just tested it, and unfortunately the answer is no.
This fails with a compilation error on the symbol
import. I also found this while searching the issue, which appears to state that import / module support is not yet available in V8 5.4.As I've often said, we are bug for bug, feature for feature compatible with V8. We can do as much as V8, but no more.