Created
May 10, 2025 11:04
Revisions
-
scmx created this gist
May 10, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ # How to start Node.js repl with some ESM already imported `repl.js` ```javascript import { foo, bar } from './foobar.js' import { baz } from './baz.js' Object.assign(globalThis, { foo, bar, baz }) ``` `node -r ./repl.js` Now foo, bar, baz will be available.