mirror of https://github.com/webpack/webpack.git
add dependencyType to externals function data
This commit is contained in:
parent
629f9f031c
commit
35a399e81a
|
@ -2743,6 +2743,10 @@ export interface ExternalItemFunctionData {
|
||||||
* Contextual information.
|
* Contextual information.
|
||||||
*/
|
*/
|
||||||
contextInfo?: import("../lib/ModuleFactory").ModuleFactoryCreateDataContextInfo;
|
contextInfo?: import("../lib/ModuleFactory").ModuleFactoryCreateDataContextInfo;
|
||||||
|
/**
|
||||||
|
* The category of the referencing dependencies.
|
||||||
|
*/
|
||||||
|
dependencyType?: string;
|
||||||
/**
|
/**
|
||||||
* Get a resolve function with the current resolver options.
|
* Get a resolve function with the current resolver options.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -172,13 +172,14 @@ class ExternalModuleFactoryPlugin {
|
||||||
cb
|
cb
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
const dependencyType = dependency.category || "";
|
||||||
const promise = externals(
|
const promise = externals(
|
||||||
{
|
{
|
||||||
context,
|
context,
|
||||||
request: dependency.request,
|
request: dependency.request,
|
||||||
|
dependencyType,
|
||||||
contextInfo,
|
contextInfo,
|
||||||
getResolve: options => (context, request, callback) => {
|
getResolve: options => (context, request, callback) => {
|
||||||
const dependencyType = dependency.category || "";
|
|
||||||
const resolveContext = {
|
const resolveContext = {
|
||||||
fileDependencies: data.fileDependencies,
|
fileDependencies: data.fileDependencies,
|
||||||
missingDependencies: data.missingDependencies,
|
missingDependencies: data.missingDependencies,
|
||||||
|
|
|
@ -807,6 +807,10 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"tsType": "import('../lib/ModuleFactory').ModuleFactoryCreateDataContextInfo"
|
"tsType": "import('../lib/ModuleFactory').ModuleFactoryCreateDataContextInfo"
|
||||||
},
|
},
|
||||||
|
"dependencyType": {
|
||||||
|
"description": "The category of the referencing dependencies.",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"getResolve": {
|
"getResolve": {
|
||||||
"description": "Get a resolve function with the current resolver options.",
|
"description": "Get a resolve function with the current resolver options.",
|
||||||
"instanceof": "Function",
|
"instanceof": "Function",
|
||||||
|
|
|
@ -3617,6 +3617,11 @@ declare interface ExternalItemFunctionData {
|
||||||
*/
|
*/
|
||||||
contextInfo?: ModuleFactoryCreateDataContextInfo;
|
contextInfo?: ModuleFactoryCreateDataContextInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The category of the referencing dependencies.
|
||||||
|
*/
|
||||||
|
dependencyType?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a resolve function with the current resolver options.
|
* Get a resolve function with the current resolver options.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue