mirror of https://github.com/webpack/webpack.git
Merge pull request #16781 from askoufis/loader-context-target-type
feat: Add `target` to `LoaderContext` type
This commit is contained in:
commit
97b1718720
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue