Skip to content

Commit

Permalink
feat: Add target to LoaderContext type
Browse files Browse the repository at this point in the history
  • Loading branch information
askoufis committed Mar 6, 2023
1 parent b7fc4d8 commit 5f34acf
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 5f34acf

Please sign in to comment.