mirror of https://github.com/webpack/webpack.git
Merge pull request #12987 from barak007/export-missing-entities
Export AsyncDependenciesBlock and ModuleDependency
This commit is contained in:
commit
b9519dcf01
|
|
@ -215,7 +215,9 @@ class Dependency {
|
|||
}
|
||||
}
|
||||
|
||||
/** @type {string[][]} */
|
||||
Dependency.NO_EXPORTS_REFERENCED = [];
|
||||
/** @type {string[][]} */
|
||||
Dependency.EXPORTS_OBJECT_REFERENCED = [[]];
|
||||
|
||||
Object.defineProperty(Dependency.prototype, "module", {
|
||||
|
|
|
|||
15
lib/index.js
15
lib/index.js
|
|
@ -114,6 +114,9 @@ module.exports = mergeExports(fn, {
|
|||
get AutomaticPrefetchPlugin() {
|
||||
return require("./AutomaticPrefetchPlugin");
|
||||
},
|
||||
get AsyncDependenciesBlock() {
|
||||
return require("./AsyncDependenciesBlock");
|
||||
},
|
||||
get BannerPlugin() {
|
||||
return require("./BannerPlugin");
|
||||
},
|
||||
|
|
@ -318,6 +321,18 @@ module.exports = mergeExports(fn, {
|
|||
}
|
||||
},
|
||||
|
||||
dependencies: {
|
||||
get ModuleDependency() {
|
||||
return require("./dependencies/ModuleDependency");
|
||||
},
|
||||
get ConstDependency() {
|
||||
return require("./dependencies/ConstDependency");
|
||||
},
|
||||
get NullDependency() {
|
||||
return require("./dependencies/NullDependency");
|
||||
}
|
||||
},
|
||||
|
||||
ids: {
|
||||
get ChunkModuleIdRangePlugin() {
|
||||
return require("./ids/ChunkModuleIdRangePlugin");
|
||||
|
|
|
|||
|
|
@ -318,7 +318,14 @@ declare interface AssetResourceGeneratorOptions {
|
|||
*/
|
||||
publicPath?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
||||
}
|
||||
declare abstract class AsyncDependenciesBlock extends DependenciesBlock {
|
||||
declare class AsyncDependenciesBlock extends DependenciesBlock {
|
||||
constructor(
|
||||
groupOptions: RawChunkGroupOptions & { name?: string } & {
|
||||
entryOptions?: EntryOptions;
|
||||
},
|
||||
loc?: SyntheticDependencyLocation | RealDependencyLocation,
|
||||
request?: string
|
||||
);
|
||||
groupOptions: RawChunkGroupOptions & { name?: string } & {
|
||||
entryOptions?: EntryOptions;
|
||||
};
|
||||
|
|
@ -2099,6 +2106,22 @@ type ConnectionState =
|
|||
| boolean
|
||||
| typeof TRANSITIVE_ONLY
|
||||
| typeof CIRCULAR_CONNECTION;
|
||||
declare class ConstDependency extends NullDependency {
|
||||
constructor(
|
||||
expression: string,
|
||||
range: number | [number, number],
|
||||
runtimeRequirements?: string[]
|
||||
);
|
||||
expression: string;
|
||||
range: number | [number, number];
|
||||
runtimeRequirements: null | Set<string>;
|
||||
static Template: typeof ConstDependencyTemplate;
|
||||
static NO_EXPORTS_REFERENCED: string[][];
|
||||
static EXPORTS_OBJECT_REFERENCED: string[][];
|
||||
}
|
||||
declare class ConstDependencyTemplate extends NullDependencyTemplate {
|
||||
constructor();
|
||||
}
|
||||
declare interface Constructor {
|
||||
new (...params: any[]): any;
|
||||
}
|
||||
|
|
@ -2436,14 +2459,15 @@ declare class Dependency {
|
|||
deserialize(__0: { read: any }): void;
|
||||
module: any;
|
||||
readonly disconnect: any;
|
||||
static NO_EXPORTS_REFERENCED: any[];
|
||||
static EXPORTS_OBJECT_REFERENCED: never[][];
|
||||
static NO_EXPORTS_REFERENCED: string[][];
|
||||
static EXPORTS_OBJECT_REFERENCED: string[][];
|
||||
}
|
||||
declare interface DependencyConstructor {
|
||||
new (...args: any[]): Dependency;
|
||||
}
|
||||
type DependencyLocation = SyntheticDependencyLocation | RealDependencyLocation;
|
||||
declare abstract class DependencyTemplate {
|
||||
declare class DependencyTemplate {
|
||||
constructor();
|
||||
apply(
|
||||
dependency: Dependency,
|
||||
source: ReplaceSource,
|
||||
|
|
@ -5897,10 +5921,14 @@ declare class ModuleConcatenationPlugin {
|
|||
*/
|
||||
apply(compiler: Compiler): void;
|
||||
}
|
||||
declare abstract class ModuleDependency extends Dependency {
|
||||
declare class ModuleDependency extends Dependency {
|
||||
constructor(request: string);
|
||||
request: string;
|
||||
userRequest: string;
|
||||
range: any;
|
||||
static Template: typeof DependencyTemplate;
|
||||
static NO_EXPORTS_REFERENCED: string[][];
|
||||
static EXPORTS_OBJECT_REFERENCED: string[][];
|
||||
}
|
||||
declare abstract class ModuleFactory {
|
||||
create(
|
||||
|
|
@ -6791,6 +6819,15 @@ type NormalizedStatsOptions = KnownNormalizedStatsOptions &
|
|||
| "_env"
|
||||
> &
|
||||
Record<string, any>;
|
||||
declare class NullDependency extends Dependency {
|
||||
constructor();
|
||||
static Template: typeof NullDependencyTemplate;
|
||||
static NO_EXPORTS_REFERENCED: string[][];
|
||||
static EXPORTS_OBJECT_REFERENCED: string[][];
|
||||
}
|
||||
declare class NullDependencyTemplate extends DependencyTemplate {
|
||||
constructor();
|
||||
}
|
||||
declare interface ObjectDeserializerContext {
|
||||
read: () => any;
|
||||
}
|
||||
|
|
@ -11439,6 +11476,9 @@ declare namespace exports {
|
|||
options: WebpackOptionsNormalized
|
||||
) => void;
|
||||
}
|
||||
export namespace dependencies {
|
||||
export { ModuleDependency, ConstDependency, NullDependency };
|
||||
}
|
||||
export namespace ids {
|
||||
export {
|
||||
ChunkModuleIdRangePlugin,
|
||||
|
|
@ -11630,6 +11670,7 @@ declare namespace exports {
|
|||
) => void;
|
||||
export {
|
||||
AutomaticPrefetchPlugin,
|
||||
AsyncDependenciesBlock,
|
||||
BannerPlugin,
|
||||
Cache,
|
||||
Chunk,
|
||||
|
|
|
|||
Loading…
Reference in New Issue