Just as having "type":"module" in package.json in the current directory implies that .js files can do import x from 'y', typing node (and then some code) in the directory, where that package.json is, shall also understand import x from 'y'.
In addition there shall be a way to pass a command line switch to node, so that on REPL it understands ES6 import.
@dilyanpalauzov ideally it should understand both, no matter if "type": "module" is used or not.
I propose also, that node --input-type=module does not print to stderr Cannot specify --input-type for REPL.
I'm working on adding static imports and such to V8's repl mode, it won't be contingent on mode flags.
@devsnek do you have the time to look into adding the REPL mode to core as well? This likely needs some work on the VM module and you are probably one of the best to look into that?
@BridgeAR yeah I can look into it eventually... the main change would probably just be making default eval use Runtime.evaluate
Most helpful comment
I'm working on adding static imports and such to V8's repl mode, it won't be contingent on mode flags.