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
The only "trick" this project does is what you've just spotted, allow ES6 import syntax to be converted to commonjs require statements, mostly because IDEs such as vscode when using this format will pull the right type definition files giving you type hinting and proper code completion.
If you need more advanced features then you should rely on a ES6 transpiler such as babel, buble, traceur, etc... but this is not included in this project.
The reason is that the same runtime will run on GraalVM which is already ES6 ready (GraalVM support is still very experimental and has not been production tested, so currently it is just a development feature).
I've managed to get the Java imports working great, but now I'm trying to import a class and it won't work. It appears it needs to be transpiled.
What doesn't work:
In my index.js I have
import {Licensee} from './src/routes/licensee';
and licensee.js is just:What does work:
index.js:
licensee.js:
Any tips on how to get it to transpile with the class? Very much appreciated! :)
The text was updated successfully, but these errors were encountered: