Skip to content

Commit

Permalink
Merge pull request #16781 from askoufis/loader-context-target-type
Browse files Browse the repository at this point in the history
feat: Add `target` to `LoaderContext` type
  • Loading branch information
TheLarkInn committed Mar 8, 2023
2 parents b84efe6 + 5f34acf commit 97b1718
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions declarations/LoaderContext.d.ts
Expand Up @@ -212,6 +212,12 @@ export interface LoaderRunnerLoaderContext<OptionsType> {
* Example: "/abc/resource.js?query#frag"
*/
resource: string;

/**
* Target of compilation.
* Example: "web"
*/
target: string;
}

type AdditionalData = {
Expand Down
6 changes: 6 additions & 0 deletions types.d.ts
Expand Up @@ -6595,6 +6595,12 @@ declare interface LoaderRunnerLoaderContext<OptionsType> {
* Example: "/abc/resource.js?query#frag"
*/
resource: string;

/**
* Target of compilation.
* Example: "web"
*/
target: string;
}
declare class LoaderTargetPlugin {
constructor(target: string);
Expand Down

0 comments on commit 97b1718

Please sign in to comment.