feat: Add `target` to `LoaderContext` type

This commit is contained in:
Adam Skoufis 2023-03-07 09:39:54 +11:00
parent b7fc4d876d
commit 5f34acfbc0
No known key found for this signature in database
GPG Key ID: 45FA8D00A90E3706
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);