Skip to main content

CJS_FREE_PREFIX

Constant CJS_FREE_PREFIX 

Source
pub const CJS_FREE_PREFIX: &str = "%esm.cjs.";
Expand description

Prefix a free reference to a CommonJS wrapper name gets in module code, so that it resolves to nothing: require is a lazily-bound global of this runtime, but in an ES module it is not defined at all. arguments is in the list too: module code runs inside the lowered function, whose own arguments the module’s top level must not see.