From 1748b088ab9d36f4d351e0d45c0cd00db628ea60 Mon Sep 17 00:00:00 2001 From: Cory Deppen Date: Tue, 30 Jan 2018 14:27:04 -0500 Subject: [PATCH] Allow resolveWeak to return a string (#23270) Handles cases where module ids are hashed. --- types/webpack-env/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/webpack-env/index.d.ts b/types/webpack-env/index.d.ts index 7320a438e9..1f03a25647 100644 --- a/types/webpack-env/index.d.ts +++ b/types/webpack-env/index.d.ts @@ -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. */