From 5f34acfbc074da6cc09f48944d7f2b4273ffb3f8 Mon Sep 17 00:00:00 2001 From: Adam Skoufis Date: Tue, 7 Mar 2023 09:39:54 +1100 Subject: [PATCH] feat: Add `target` to `LoaderContext` type --- declarations/LoaderContext.d.ts | 6 ++++++ types.d.ts | 6 ++++++ 2 files changed, 12 insertions(+) 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);