-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REPL with package.json "type":"module" #33369
Comments
@dilyanpalauzov ideally it should understand both, no matter if |
I propose also, that |
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 |
any update on this? |
🏓 |
this would be amazing |
Bump, this would be very cool |
For people who landed here from Google and don't need REPL specifically but node --input-type=module --eval "import test from './test.js'; console.log(test);" |
Just as having "type":"module" in package.json in the current directory implies that .js files can do
import x from 'y'
, typingnode
(and then some code) in the directory, where that package.json is, shall also understandimport 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
.The text was updated successfully, but these errors were encountered: