On this page

These properties are added by the LoaderPlugin

loaderPluginLoaderContext.importModule(request, options, callback): void
Attributes
request:string
callback:(err?: Error | null, exports?: any) => void
loaderPluginLoaderContext.importModule(request, options?): Promise<any>
Attributes
request:string
Returns:Promise<any>
loaderPluginLoaderContext.loadModule(request, callback): void
Attributes
request:string
callback:(err: Error | null, source?: string | Buffer<ArrayBufferLike>, sourceMap?: object | null, module?: Module) => void

Resolves the given request to a module, applies all configured loaders and calls back with the generated source, the sourceMap and the module instance (usually an instance of NormalModule). Use this function if you need to know the source code of another module to generate the result.