SyntaxError:./core-features/esm-index.js:1:62 Expected an operand but found import
(function (exports, require, module, __filename, __dirname) { import './sideEffectAsyncAwait.js'
es4x esm-index.mjs
import './sideEffectAsyncAwait.js'
results in
Error: sideEffectAsyncAwait
at org.graalvm.polyglot.Context.eval(Context.java:345)
at io.reactiverse.es4x.Runtime.eval(Runtime.java:150)
at io.reactiverse.es4x.impl.MJSVerticleFactory$1.start(MJSVerticleFactory.java:53)
at io.vertx.core.Verticle.start(Verticle.java:66)
Shared Example
sideEffectAsyncAwait.js
async function Await(msg) {
const me = await Promise.resolve(msg)
console.log(me)
}
Await('hi Await async').then(console.log)
es4x esm-index.js
results in
es4x esm-index.mjs
results in
Shared Example
sideEffectAsyncAwait.js