Skip to content

Instantly share code, notes, and snippets.

@warner
Last active January 30, 2019 00:11
Show Gist options
  • Save warner/4cc127a88cb6479f3f0b0bcfeab69a42 to your computer and use it in GitHub Desktop.
Save warner/4cc127a88cb6479f3f0b0bcfeab69a42 to your computer and use it in GitHub Desktop.
export default function foo() {}
setup:
npm install esm
setup-old:
npm install esm@3.0.84
run:
ESM_DISABLE_CACHE=1 node -r esm test.js
import foo from './foo.js';
export default function Realm() {}
import Realm from './realm.js';
function check() {
const r = new Realm();
}
const r2 = new Realm();
const f = `${check}`;
console.log(`f is ${f}`);
// we need ${f} to cite a global "Realm" name, not something rewritten
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment