From a501301d9d940abb3c387effc2e7c19650da6542 Mon Sep 17 00:00:00 2001 From: Luuk Sommers Date: Mon, 28 Jan 2019 23:43:05 +0100 Subject: [PATCH 1/2] webpack-env: Fix missing mode argument in require.context --- 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 d9047f965e..0fde1243f4 100644 --- a/types/webpack-env/index.d.ts +++ b/types/webpack-env/index.d.ts @@ -32,7 +32,7 @@ declare namespace __WebpackModuleApi { * This creates a chunk. The chunk can be named. If a chunk with this name already exists, the dependencies are merged into that chunk and that chunk is used. */ ensure(paths: string[], callback: (require: NodeRequire) => void, errorCallback?: (error: any) => void, chunkName?: string): void; - context(path: string, deep?: boolean, filter?: RegExp): RequireContext; + context(path: string, deep?: boolean, filter?: RegExp, mode?: string): RequireContext; /** * Returns the module id of a dependency. The call is sync. No request to the server is fired. The compiler ensures that the dependency is available. * From e891129be1adea5d0869b10accf844f3fda05f58 Mon Sep 17 00:00:00 2001 From: use-strict Date: Tue, 29 Jan 2019 11:47:44 +0100 Subject: [PATCH 2/2] Update types/webpack-env/index.d.ts Co-Authored-By: luuksommers --- 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 0fde1243f4..293f06797d 100644 --- a/types/webpack-env/index.d.ts +++ b/types/webpack-env/index.d.ts @@ -32,7 +32,7 @@ declare namespace __WebpackModuleApi { * This creates a chunk. The chunk can be named. If a chunk with this name already exists, the dependencies are merged into that chunk and that chunk is used. */ ensure(paths: string[], callback: (require: NodeRequire) => void, errorCallback?: (error: any) => void, chunkName?: string): void; - context(path: string, deep?: boolean, filter?: RegExp, mode?: string): RequireContext; + context(path: string, deep?: boolean, filter?: RegExp, mode?: "sync" | "eager" | "weak" | "lazy" | "lazy-once"): RequireContext; /** * Returns the module id of a dependency. The call is sync. No request to the server is fired. The compiler ensures that the dependency is available. *