mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-11-30 02:01:46 +00:00
Add loadModule method to webpack laoder context
This commit is contained in:
Vendored
+8
@@ -1594,6 +1594,14 @@ declare namespace webpack {
|
||||
*/
|
||||
exec(code: string, filename: string): any;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
loadModule(request: string, callback: (err: Error, source: string, sourceMap: RawSourceMap, module: Module) => void): any;
|
||||
|
||||
/**
|
||||
* Resolve a request like a require expression.
|
||||
*/
|
||||
|
||||
@@ -516,6 +516,7 @@ function loader(this: webpack.loader.LoaderContext, source: string | Buffer, sou
|
||||
|
||||
this.addDependency('');
|
||||
|
||||
this.loadModule('path', (err: Error, result: string, sourceMape: RawSourceMap, module: webpack.Module) => { });
|
||||
this.resolve('context', 'request', (err: Error, result: string) => { });
|
||||
|
||||
this.emitWarning('warning message');
|
||||
|
||||
Reference in New Issue
Block a user