Module esm

Source

Structs§

EsmAssetReference
EsmAsyncAssetReference
EsmBinding
EsmExports
EsmModuleItem
Makes code changes to remove export/import declarations and places the expr/decl in a normal statement. Unnamed expr/decl will be named with the magic identifier “export default”
ImportMetaBinding
Responsible for initializing the import.meta object binding, so that it may be referenced in th the file.
ImportMetaRef
Handles rewriting import.meta references into the injected binding created by ImportMetaBinding.
UrlAssetReference
URL Asset References are injected during code analysis when we find a (statically analyzable) new URL("path", import.meta.url).

Enums§

EsmExport
FoundExportType
Liveness
Models the ‘liveness’ of an esm export All ESM exports are technically live but many never change and we can optimize representation to support that, this enum tracks the actual behavior of the export binding.
UrlRewriteBehavior
Determines how to treat new URL(...) rewrites. This allows to construct url depends on the different building context, e.g. SSR, CSR, or Node.js.