On this page

new Compiler(context, options?): Compiler
Attributes
context:<string>
the compilation path
options:
{WebpackOptionsNormalized} options
Returns:
{Compiler}
  • cache {CacheClass}
  • compilerPath <string>
  • context <string>
  • contextTimestamps {Map<string, "ignore"|EntryTypesIndex|OnlySafeTimeEntry|ExistenceOnlyTimeEntryTypesIndex>}
  • fileTimestamps {Map<string, "ignore"|EntryTypesIndex|OnlySafeTimeEntry|ExistenceOnlyTimeEntryTypesIndex>}
  • fsStartTime <number>
  • hooks {Readonly}
  • idle <boolean>
  • immutablePaths {Set<string|RegExp>}
  • infrastructureLogger <object>
  • inputFileSystem {InputFileSystem}
  • intermediateFileSystem {IntermediateFileSystem}
  • managedPaths {Set<string|RegExp>}
  • modifiedFiles {ReadonlySet}
  • moduleMemCaches {Map<Module, ModuleMemCachesItem>}
  • name <string>
  • options {WebpackOptionsNormalized}
  • outputFileSystem {OutputFileSystem}
  • outputPath <string>
  • parentCompilation {Compilation}
  • platform {Readonly}
  • records {Records}
  • recordsInputPath <string>
  • recordsOutputPath <string>
  • removedFiles {ReadonlySet}
  • requestShortener {RequestShortener}
  • resolverFactory {ResolverFactory}
  • root {Compiler}
  • running <boolean>
  • unmanagedPaths {Set<string|RegExp>}
  • watchFileSystem {WatchFileSystem}
  • watching {Watching}
  • watchMode <boolean>
  • webpack {exports}
  • webpack.Compiler.close(callback): void
    Attributes
    callback:<object>
    signals when the compiler closes
    Returns:
    {void}

    webpack.Compiler.compile(callback): void
    • callback {CallbackWebpackFunction_2<Compilation, void>} signals when the compilation finishes
    • Returns: {void}

    webpack.Compiler.createChildCompiler(compilation, compilerName, compilerIndex, outputOptions?, plugins?): void
    • compilation {Compilation} the compilation
    • compilerName <string> the compiler's name
    • compilerIndex <number> the compiler's index
    • outputOptions {Partial} the output options
    • plugins <object[]> the plugins to apply
    • Returns: {Compiler} a child compiler

    webpack.Compiler.createCompilation(params): void
    • params {CompilationParams} the compilation parameters
    • Returns: {Compilation} compilation

    webpack.Compiler.createContextModuleFactory(): ContextModuleFactory
    Returns:
    {ContextModuleFactory}

    webpack.Compiler.createNormalModuleFactory(): NormalModuleFactory
    Returns:
    {NormalModuleFactory}

    webpack.Compiler.emitAssets(compilation, callback): void
    • compilation {Compilation} the compilation
    • callback <object> signals when the assets are emitted
    • Returns: {void}

    webpack.Compiler.emitRecords(callback): void
    Attributes
    callback:<object>
    signals when the call finishes
    Returns:
    {void}

    webpack.Compiler.getCache(name): CacheFacade
    Attributes
    cache name
    Returns:
    {CacheFacade} the cache facade instance

    webpack.Compiler.getInfrastructureLogger(name): WebpackLogger
    Attributes
    name of the logger, or function called once to get the logger name
    Returns:
    {WebpackLogger} a logger with that name

    webpack.Compiler.isChild(): boolean
    Returns:<boolean>

    webpack.Compiler.Compilation(params): void
    • params {CompilationParams} the compilation parameters
    • Returns: {Compilation} the created compilation

    webpack.Compiler.CompilationParams(): object
    Returns:<object>

    webpack.Compiler.purgeInputFileSystem(): void
    Returns:
    {void}

    webpack.Compiler.readRecords(callback): void
    Attributes
    callback:<object>
    signals when the call finishes
    Returns:
    {void}

    webpack.Compiler.run(callback): void
    • callback {CallbackWebpackFunction_2<Stats, void>} signals when the call finishes
    • Returns: {void}

    webpack.Compiler.runAsChild(callback): void
    Attributes
    callback:<object>
    signals when the call finishes
    Returns:
    {void}

    webpack.Compiler.validate(schema, value, options?, check?): void
    Attributes
    schema:<object>
    schema
    value:
    {T} value
    options:
    {ValidationErrorConfiguration} options
    check:<object>
    options
    Returns:
    {void}

    Schema validation function with optional pre-compiled check


    webpack.Compiler.watch(watchOptions, handler): void
    • watchOptions {WatchOptions} the watcher's options
    • handler {CallbackWebpackFunction_2<Stats, void>} signals when the call finishes
    • Returns: {Watching} a compiler watcher