See modules directory for details
default-exportexports.default = "default";
named-and-default-exportexports.named = "named"; exports.default = "default";
named-and-null-default-exportexports.named = "named"; exports.default = null;- Is a falsy default export handled different from a truthy default export?
named-exportexports.named = "named";- How are only named exports handled?
tlaawait Promise.resolve();- A module using top-level-await
- Is this syntax supported?
order.jsexports.b = "b"; exports.a = "a"; exports.c = "c";- Are exports in namespace objects alphabetically ordered?
single-module.exports = ...- How is a single
module.exportsexport handled?
single-...-definedObject.defineProperty(module, "exports", { value: ... })
single-promise-module.exports = Promise.resolve(...)- Is a Promise handled when using
import()? - Is it handled like Top-Level-Await when using
import?
-esModuleObject.defineProperty(exports, "__esModule", { value: true });- How is the default export handled with
__esModule?
-non-enumerable- Exports defined with
Object.defineProperty(exports, "name", { value: "value" }); - Does non-enumerable exports behave like normal exports?
- Exports defined with
-getter- Exports defined with
Object.defineProperty(exports, "name", { get: () => "value" }); - Does getter exports behave like normal exports?
- Exports defined with
-inherited- Exports set on the prototype of
exports - Does inherited exports behave like normal exports?
- Exports set on the prototype of
-runtime- Export keys and values not compile time constant, also for __esModule
- Is the behavior different when module is not statically analysable?
-live- Exports are set one tick after module evaluation
- Are exports live-bindings or copied after evaluation?
-esm-reexport- Module is reexported via
export * from "..." - Is there a behavior change from reexporting?
- Is default export (incorrectly) exported?
- Module is reexported via
-reexport- Module is reexported via
module.export = require("...") - Is there a behavior change from reexporting?
- Module is reexported via
-esm- An ESM module
- How does the ESM module compare to the CommonJS equivalent?