Hierarchy

  • Compilation

Constructors

Properties

Methods

Constructors

Properties

addModuleQueue: AsyncQueue<Module, string, Module>
additionalChunkAssets: string[]
assetsInfo: Map<string, AssetInfo>
asyncEntrypoints: Entrypoint[]
bail: boolean
buildDependencies: LazySet<string>
buildTimeExecutedModules: WeakSet<Module>
builtModules: WeakSet<Module>
children: Compilation[]
childrenCounters: object
chunkGraph: ChunkGraph
chunkGroups: ChunkGroup[]
chunkTemplate: ChunkTemplate
chunks: Set<Chunk>
codeGeneratedModules: WeakSet<Module>
codeGenerationResults: CodeGenerationResults
comparedForEmitAssets: Set<string>
compilationDependencies: {
    add: ((item?) => LazySet<string>);
}

Type declaration

  • add: ((item?) => LazySet<string>)
      • (item?): LazySet<string>
      • Parameters

        • Optional item: any

        Returns LazySet<string>

compiler: Compiler
compilerPath: string
contextDependencies: LazySet<string>
creatingModuleDuringBuild: WeakMap<Module, Set<Module>>

Modules in value are building during the build of Module in key. Means value blocking key from finishing. Needed to detect build cycles.

dependencyFactories: Map<DepConstructor, ModuleFactory>
dependencyTemplates: DependencyTemplates
emittedAssets: Set<string>
endTime: any
entries: Map<string, EntryData>
entrypoints: Map<string, Entrypoint>
errors: WebpackError[]
factorizeModule: {
    (options, callback): void;
    (options, callback): void;
}

Type declaration

    • (options, callback): void
    • Parameters

      • options: FactorizeModuleOptions & {
            factoryResult?: false;
        }
      • callback: ((err?, result?) => void)
          • (err?, result?): void
          • Parameters

            Returns void

      Returns void

    • (options, callback): void
    • Parameters

      Returns void

fileDependencies: LazySet<string>
fileSystemInfo: FileSystemInfo
fullHash?: string
globalEntry: EntryData
hash?: string
hooks: Readonly<{
    addEntry: SyncHook<[Dependency, EntryOptions], void, UnsetAdditionalOptions>;
    additionalAssets: FakeHook<Pick<AsyncSeriesHook<[], UnsetAdditionalOptions>, "name" | "tap" | "tapAsync" | "tapPromise">>;
    additionalChunkAssets: FakeHook<Pick<AsyncSeriesHook<[Set<Chunk>], UnsetAdditionalOptions>, "name" | "tap" | "tapAsync" | "tapPromise">>;
    additionalChunkRuntimeRequirements: SyncHook<[Chunk, Set<string>, RuntimeRequirementsContext], void, UnsetAdditionalOptions>;
    additionalModuleRuntimeRequirements: SyncHook<[Module, Set<string>, RuntimeRequirementsContext], void, UnsetAdditionalOptions>;
    additionalTreeRuntimeRequirements: SyncHook<[Chunk, Set<string>, RuntimeRequirementsContext], void, UnsetAdditionalOptions>;
    afterChunks: SyncHook<[Iterable<Chunk>], void, UnsetAdditionalOptions>;
    afterCodeGeneration: SyncHook<[], void, UnsetAdditionalOptions>;
    afterHash: SyncHook<[], void, UnsetAdditionalOptions>;
    afterModuleHash: SyncHook<[], void, UnsetAdditionalOptions>;
    afterOptimizeAssets: SyncHook<[CompilationAssets], void, UnsetAdditionalOptions>;
    afterOptimizeChunkAssets: FakeHook<Pick<AsyncSeriesHook<[Set<Chunk>], UnsetAdditionalOptions>, "name" | "tap" | "tapAsync" | "tapPromise">>;
    afterOptimizeChunkIds: SyncHook<[Iterable<Chunk>], void, UnsetAdditionalOptions>;
    afterOptimizeChunkModules: SyncHook<[Iterable<Chunk>, Iterable<Module>], void, UnsetAdditionalOptions>;
    afterOptimizeChunks: SyncHook<[Iterable<Chunk>, ChunkGroup[]], void, UnsetAdditionalOptions>;
    afterOptimizeDependencies: SyncHook<[Iterable<Module>], void, UnsetAdditionalOptions>;
    afterOptimizeModuleIds: SyncHook<[Iterable<Module>], void, UnsetAdditionalOptions>;
    afterOptimizeModules: SyncHook<[Iterable<Module>], void, UnsetAdditionalOptions>;
    afterOptimizeTree: SyncHook<[Iterable<Chunk>, Iterable<Module>], void, UnsetAdditionalOptions>;
    afterProcessAssets: SyncHook<[CompilationAssets], void, UnsetAdditionalOptions>;
    afterRuntimeRequirements: SyncHook<[], void, UnsetAdditionalOptions>;
    afterSeal: AsyncSeriesHook<[], UnsetAdditionalOptions>;
    assetPath: SyncWaterfallHook<[string, object, AssetInfo], UnsetAdditionalOptions>;
    beforeChunkAssets: SyncHook<[], void, UnsetAdditionalOptions>;
    beforeChunkIds: SyncHook<[Iterable<Chunk>], void, UnsetAdditionalOptions>;
    beforeChunks: SyncHook<[], void, UnsetAdditionalOptions>;
    beforeCodeGeneration: SyncHook<[], void, UnsetAdditionalOptions>;
    beforeHash: SyncHook<[], void, UnsetAdditionalOptions>;
    beforeModuleAssets: SyncHook<[], void, UnsetAdditionalOptions>;
    beforeModuleHash: SyncHook<[], void, UnsetAdditionalOptions>;
    beforeModuleIds: SyncHook<[Iterable<Module>], void, UnsetAdditionalOptions>;
    beforeRuntimeRequirements: SyncHook<[], void, UnsetAdditionalOptions>;
    buildModule: SyncHook<[Module], void, UnsetAdditionalOptions>;
    childCompiler: SyncHook<[Compiler, string, number], void, UnsetAdditionalOptions>;
    chunkAsset: SyncHook<[Chunk, string], void, UnsetAdditionalOptions>;
    chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext], void, UnsetAdditionalOptions>;
    chunkIds: SyncHook<[Iterable<Chunk>], void, UnsetAdditionalOptions>;
    contentHash: SyncHook<[Chunk], void, UnsetAdditionalOptions>;
    dependencyReferencedExports: SyncWaterfallHook<[(string[] | ReferencedExport)[], Dependency, RuntimeSpec], UnsetAdditionalOptions>;
    executeModule: SyncHook<[ExecuteModuleArgument, ExecuteModuleContext], void, UnsetAdditionalOptions>;
    failedEntry: SyncHook<[Dependency, EntryOptions, Error], void, UnsetAdditionalOptions>;
    failedModule: SyncHook<[Module, WebpackError], void, UnsetAdditionalOptions>;
    finishModules: AsyncSeriesHook<[Iterable<Module>], UnsetAdditionalOptions>;
    finishRebuildingModule: AsyncSeriesHook<[Module], UnsetAdditionalOptions>;
    fullHash: SyncHook<[Hash], void, UnsetAdditionalOptions>;
    log: SyncBailHook<[string, LogEntry], true, UnsetAdditionalOptions>;
    moduleAsset: SyncHook<[Module, string], void, UnsetAdditionalOptions>;
    moduleIds: SyncHook<[Iterable<Module>], void, UnsetAdditionalOptions>;
    needAdditionalPass: SyncBailHook<[], boolean, UnsetAdditionalOptions>;
    needAdditionalSeal: SyncBailHook<[], boolean, UnsetAdditionalOptions>;
    optimize: SyncHook<[], void, UnsetAdditionalOptions>;
    optimizeAssets: AsyncSeriesHook<[CompilationAssets], ProcessAssetsAdditionalOptions>;
    optimizeChunkAssets: FakeHook<Pick<AsyncSeriesHook<[Set<Chunk>], UnsetAdditionalOptions>, "name" | "tap" | "tapAsync" | "tapPromise">>;
    optimizeChunkIds: SyncHook<[Iterable<Chunk>], void, UnsetAdditionalOptions>;
    optimizeChunkModules: AsyncSeriesBailHook<[Iterable<Chunk>, Iterable<Module>], any, UnsetAdditionalOptions>;
    optimizeChunks: SyncBailHook<[Iterable<Chunk>, ChunkGroup[]], any, UnsetAdditionalOptions>;
    optimizeCodeGeneration: SyncHook<[Iterable<Module>], void, UnsetAdditionalOptions>;
    optimizeDependencies: SyncBailHook<[Iterable<Module>], any, UnsetAdditionalOptions>;
    optimizeModuleIds: SyncHook<[Iterable<Module>], void, UnsetAdditionalOptions>;
    optimizeModules: SyncBailHook<[Iterable<Module>], any, UnsetAdditionalOptions>;
    optimizeTree: AsyncSeriesHook<[Iterable<Chunk>, Iterable<Module>], UnsetAdditionalOptions>;
    prepareModuleExecution: AsyncParallelHook<[ExecuteModuleArgument, ExecuteModuleContext], UnsetAdditionalOptions>;
    processAdditionalAssets: AsyncSeriesHook<[CompilationAssets], UnsetAdditionalOptions>;
    processAssets: AsyncSeriesHook<[CompilationAssets], ProcessAssetsAdditionalOptions>;
    processErrors: SyncWaterfallHook<[WebpackError[]], UnsetAdditionalOptions>;
    processWarnings: SyncWaterfallHook<[WebpackError[]], UnsetAdditionalOptions>;
    rebuildModule: SyncHook<[Module], void, UnsetAdditionalOptions>;
    record: SyncHook<[Compilation, any], void, UnsetAdditionalOptions>;
    recordChunks: SyncHook<[Iterable<Chunk>, any], void, UnsetAdditionalOptions>;
    recordHash: SyncHook<[any], void, UnsetAdditionalOptions>;
    recordModules: SyncHook<[Iterable<Module>, any], void, UnsetAdditionalOptions>;
    renderManifest: SyncWaterfallHook<[RenderManifestEntry[], RenderManifestOptions], UnsetAdditionalOptions>;
    reviveChunks: SyncHook<[Iterable<Chunk>, any], void, UnsetAdditionalOptions>;
    reviveModules: SyncHook<[Iterable<Module>, any], void, UnsetAdditionalOptions>;
    runtimeModule: SyncHook<[RuntimeModule, Chunk], void, UnsetAdditionalOptions>;
    runtimeRequirementInChunk: HookMap<SyncBailHook<[Chunk, Set<string>, RuntimeRequirementsContext], any, UnsetAdditionalOptions>>;
    runtimeRequirementInModule: HookMap<SyncBailHook<[Module, Set<string>, RuntimeRequirementsContext], any, UnsetAdditionalOptions>>;
    runtimeRequirementInTree: HookMap<SyncBailHook<[Chunk, Set<string>, RuntimeRequirementsContext], any, UnsetAdditionalOptions>>;
    seal: SyncHook<[], void, UnsetAdditionalOptions>;
    shouldGenerateChunkAssets: SyncBailHook<[], boolean, UnsetAdditionalOptions>;
    shouldRecord: SyncBailHook<[], boolean, UnsetAdditionalOptions>;
    statsFactory: SyncHook<[StatsFactory, NormalizedStatsOptions], void, UnsetAdditionalOptions>;
    statsNormalize: SyncHook<[Partial<NormalizedStatsOptions>, CreateStatsOptionsContext], void, UnsetAdditionalOptions>;
    statsPreset: HookMap<SyncHook<[Partial<NormalizedStatsOptions>, CreateStatsOptionsContext], void, UnsetAdditionalOptions>>;
    statsPrinter: SyncHook<[StatsPrinter, NormalizedStatsOptions], void, UnsetAdditionalOptions>;
    stillValidModule: SyncHook<[Module], void, UnsetAdditionalOptions>;
    succeedEntry: SyncHook<[Dependency, EntryOptions, Module], void, UnsetAdditionalOptions>;
    succeedModule: SyncHook<[Module], void, UnsetAdditionalOptions>;
    unseal: SyncHook<[], void, UnsetAdditionalOptions>;
    get normalModuleLoader(): SyncHook<[object, NormalModule], void, UnsetAdditionalOptions>;
}>

Type declaration

inputFileSystem: InputFileSystem
logging: Map<string, LogEntry[]>
mainTemplate: MainTemplate
missingDependencies: LazySet<string>
moduleGraph: ModuleGraph
moduleMemCaches?: Map<Module, WeakTupleMap<any, any>>
moduleMemCaches2?: Map<Module, WeakTupleMap<any, any>>
moduleTemplates: {
    javascript: ModuleTemplate;
}

Type declaration

modules: Set<Module>
name?: string
namedChunkGroups: Map<string, ChunkGroup>
namedChunks: Map<string, Chunk>
needAdditionalPass: boolean
outputOptions: OutputNormalized
processDependenciesQueue: AsyncQueue<Module, Module, Module>
profile: boolean
rebuildQueue: AsyncQueue<Module, Module, Module>
records: any
requestShortener: RequestShortener
resolverFactory: ResolverFactory
runtimeTemplate: RuntimeTemplate
startTime: any
usedChunkIds: Set<string | number>
usedModuleIds: Set<number>
valueCacheVersions: Map<string, string | Set<string>>
warnings: WebpackError[]
PROCESS_ASSETS_STAGE_ADDITIONAL: number

Add additional assets to the compilation.

PROCESS_ASSETS_STAGE_ADDITIONS: number

Add additional sections to existing assets, like a banner or initialization code.

PROCESS_ASSETS_STAGE_ANALYSE: number

Analyse existing assets.

PROCESS_ASSETS_STAGE_DERIVED: number

Derive new assets from existing assets. Existing assets should not be treated as complete.

PROCESS_ASSETS_STAGE_DEV_TOOLING: number

Add development tooling to assets, e. g. by extracting a SourceMap.

PROCESS_ASSETS_STAGE_OPTIMIZE: number

Optimize existing assets in a general way.

PROCESS_ASSETS_STAGE_OPTIMIZE_COMPATIBILITY: number

Optimize the compatibility of existing assets, e. g. add polyfills or vendor-prefixes.

PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT: number

Optimize the count of existing assets, e. g. by merging them. Only assets of the same type should be merged. For assets of different types see PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE.

PROCESS_ASSETS_STAGE_OPTIMIZE_HASH: number

Optimize the hashes of the assets, e. g. by generating real hashes of the asset content.

PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE: number

Optimize the count of existing assets, e. g. by inlining assets of into other assets. Only assets of different types should be inlined. For assets of the same type see PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT.

PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE: number

Optimize the size of existing assets, e. g. by minimizing or omitting whitespace.

PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER: number

Optimize the transfer of existing assets, e. g. by preparing a compressed (gzip) file as separate asset.

PROCESS_ASSETS_STAGE_PRE_PROCESS: number

Basic preprocessing of assets.

PROCESS_ASSETS_STAGE_REPORT: number

Creating assets for reporting purposes.

PROCESS_ASSETS_STAGE_SUMMARIZE: number

Summarize the list of existing assets e. g. creating an assets manifest of Service Workers.

Methods

  • This method first looks to see if a name is provided for a new chunk, and first looks to see if any named chunks already exist and reuse that chunk instead.

    Parameters

    • Optional name: string

    Returns Chunk

  • Parameters

    • context: string
    • entry: Dependency
    • optionsOrName: string | EntryOptions
    • callback: ((err?, result?) => void)
        • (err?, result?): void
        • Parameters

          Returns void

    Returns void

  • Parameters

    • context: string
    • dependency: Dependency
    • options: EntryOptions
    • callback: ((err?, result?) => void)
        • (err?, result?): void
        • Parameters

          Returns void

    Returns void

  • Parameters

    • module: Module
    • callback: ((err?, result?) => void)
        • (err?, result?): void
        • Parameters

          Returns void

    Returns void

  • Parameters

    • context: string
    • dependency: Dependency
    • callback: ((err?, result?) => void)
        • (err?, result?): void
        • Parameters

          Returns void

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Returns void

  • Schedules a build of the module object

    Parameters

    • module: Module
    • callback: ((err?, result?) => void)
        • (err?, result?): void
        • Parameters

          Returns void

    Returns void

  • Returns void

  • Returns void

  • Parameters

    • Optional callback: any

    Returns void

  • This function allows you to run another instance of webpack inside of webpack however as a child with different settings and configurations (if desired) applied. It copies all hooks, plugins from parent (or top level compiler) and creates a child Compilation

    Parameters

    Returns Compiler

  • Parameters

    • callback: ((err?) => void)
        • (err?): void
        • Parameters

          Returns void

    Returns void

  • Returns {
        hash: string;
        module: Module;
        runtime: RuntimeSpec;
        runtimes: RuntimeSpec[];
    }[]

  • Returns void

  • Returns void

  • Parameters

    • Optional options: any

    Returns StatsFactory

  • Parameters

    • Optional options: any

    Returns StatsPrinter

  • Parameters

    • file: string

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Attempts to search for a module by its identifier

    Parameters

    • identifier: string

    Returns undefined | Module

  • Parameters

    • Optional callback: any

    Returns void

  • Parameters

    • name: string

    Returns undefined | Readonly<Asset>

  • Parameters

    • filename: string | ((arg0, arg1?) => string)
    • data: PathData

    Returns string

  • Parameters

    • filename: string | ((arg0, arg1?) => string)
    • data: PathData

    Returns {
        info: AssetInfo;
        path: string;
    }

  • Parameters

    • name: string

    Returns CacheFacade

  • Parameters

    • name: string | (() => string)

    Returns WebpackLogger

  • Fetches a module from a compilation by its identifier

    Parameters

    Returns Module

  • Parameters

    • filename: string | ((arg0, arg1?) => string)
    • Optional data: PathData

    Returns string

  • Parameters

    • filename: string | ((arg0, arg1?) => string)
    • Optional data: PathData

    Returns {
        info: AssetInfo;
        path: string;
    }

  • Returns Stats

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    • module: Module
    • callback: ((err?, result?) => void)
        • (err?, result?): void
        • Parameters

          Returns void

    Returns void

  • Parameters

    Returns void

  • Parameters

    • module: Module
    • callback: ((err?, result?) => void)
        • (err?, result?): void
        • Parameters

          Returns void

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    • Optional file: any
    • Optional newFile: any

    Returns void

  • Parameters

    Returns boolean

  • Parameters

    • callback: ((err?) => void)
        • (err?): void
        • Parameters

          Returns void

    Returns void

  • Returns void

  • Returns void

  • Returns void

  • Parameters

    Returns void

Generated using TypeDoc