If the imports in entry.mjs
are sorted, running node entry.mjs
will fail with
node entry.mjs
file:///Users/rberdeen/work/scratch/test-import-circular-order/b.mjs:5
export default { name, other: other.name };
^
ReferenceError: name is not defined
at file:///Users/rberdeen/work/scratch/test-import-circular-order/b.mjs:5:37
at ModuleJob.run (internal/modules/esm/module_job.js:152:23)
at async Loader.import (internal/modules/esm/loader.js:177:24)
at async Object.loadESM (internal/process/esm_loader.js:68:5)