Allow resolveWeak to return a string (#23270)

Handles cases where module ids are hashed.
This commit is contained in:
Cory Deppen
2018-01-30 11:27:04 -08:00
committed by Sheetal Nandi
parent 4c1b2958ab
commit 1748b088ab
+1 -1
View File
@@ -42,7 +42,7 @@ declare namespace __WebpackModuleApi {
/**
* Like require.resolve, but doesn’t include the module into the bundle. It’s a weak dependency.
*/
resolveWeak(path: string): number;
resolveWeak(path: string): number | string;
/**
* Ensures that the dependency is available, but don’t execute it. This can be use for optimizing the position of a module in the chunks.
*/