Hi,
Is there a way of importing a module in the CLI. If I run the import command
directly this doesn't work.
$ qjs
QuickJS - Type "\h" for help
qjs > import { Base64 } from "./base64.js";
SyntaxError: expecting '('
at <evalScript>:1
(I have tried --module/--script)
The same thing in a script runs fine:
$ cat zz
import { Base64 } from "./base64.js";
print(Base64);
$ qjs zz
[object Object]
$ qjs -h
QuickJS version 2021-03-27
Thanks, Paul