Get the Newsletter

moduleName

A Method

moduleName(moduleName: string, options?: ModuleNameOptions): string

Resolves a module name to a path resolvable by the loader. By default returns the first parameter. It is recommended to use this for all dynamic imports as it enables static analysis and optionally allows adding custom metadata used by the build step.

Parameters

moduleName: string
Absolute or relative path to the module.
options?: ModuleNameOptions
Optional options used during the static analysis that inform how to process the module.