diff --git a/declarations/LoaderContext.d.ts b/declarations/LoaderContext.d.ts index 3e9341423a7..f93a0890d2d 100644 --- a/declarations/LoaderContext.d.ts +++ b/declarations/LoaderContext.d.ts @@ -212,6 +212,12 @@ export interface LoaderRunnerLoaderContext { * Example: "/abc/resource.js?query#frag" */ resource: string; + + /** + * Target of compilation. + * Example: "web" + */ + target: string; } type AdditionalData = { diff --git a/types.d.ts b/types.d.ts index 251d0adfd3d..78da415cff2 100644 --- a/types.d.ts +++ b/types.d.ts @@ -6595,6 +6595,12 @@ declare interface LoaderRunnerLoaderContext { * Example: "/abc/resource.js?query#frag" */ resource: string; + + /** + * Target of compilation. + * Example: "web" + */ + target: string; } declare class LoaderTargetPlugin { constructor(target: string);