On this page

new Generator(): Generator
Returns:<Generator>
webpack.Generator.generate(module, __namedParameters): Source
Attributes
module for which the code should be generated
__namedParameters:
{GenerateContext}
Returns:<Source>
generated code

webpack.Generator.getConcatenationBailoutReason(module, context): string
Attributes
module for which the bailout reason should be determined
context:
{ConcatenationBailoutReasonContext} context
Returns:<string>
reason why this module can't be concatenated, undefined when it can be concatenated

webpack.Generator.getSize(module, type?): number
Attributes
the module
source type
Returns:<number>
estimate size of the module

webpack.Generator.getTypes(module): ReadonlySet<string>
Attributes
fresh module
Returns:
{ReadonlySet } available types (do not mutate)

webpack.Generator.updateHash(hash, __namedParameters): void
  • hash {Hash} hash that will be modified
  • __namedParameters {UpdateHashContextGenerator}
  • Returns: {void}

webpack.Generator.byType(map): ByTypeGenerator
Attributes
map of types
Returns:
{ByTypeGenerator} generator by type