Merge pull request #16781 from askoufis/loader-context-target-type

feat: Add `target` to `LoaderContext` type
This commit is contained in:
Sean Larkin 2023-03-08 09:17:42 -08:00 committed by GitHub
commit 97b1718720
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -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 = {

6
types.d.ts vendored
View File

@ -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);