On this page

new Template(): Template
Returns:
{Template}
Attributes
NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS:<number>
NUMBER_OF_IDENTIFIER_START_CHARS:<number>
webpack.Template.asString(str): string
Attributes
string or string collection
Returns:<string>
returns a single string from array

webpack.Template.getFunctionContent(fn): void
  • fn {Stringable} a runtime function (.runtime.js) "template"
  • Returns: <string> the updated and normalized function string

webpack.Template.getModulesArrayBounds(modules): void
  • modules {WithId[]} a collection of modules to get array bounds for
  • Returns: {false|Tuple<number, number>} returns the upper and lower array bounds or false if not every module has a number based id

webpack.Template.indent(s): string
Attributes
string to convert to identity
Returns:<string>
converted identity

webpack.Template.numberToIdentifier(n): string
Attributes
number to convert to ident
Returns:<string>
returns single character ident

webpack.Template.numberToIdentifierContinuation(n): string
Attributes
number to convert to ident
Returns:<string>
returns single character ident

webpack.Template.prefix(s, prefix): string
Attributes
string to create prefix for
prefix:<string>
prefix to compose
Returns:<string>
returns new prefix string

webpack.Template.renderChunkModules(renderContext, modules, renderModule, prefix?): void
  • renderContext {ChunkRenderContextJavascriptModulesPlugin} render context
  • modules {Module[]} modules to render (should be ordered by identifier)
  • renderModule <object> function to render a module
  • prefix <string> applying prefix strings
  • Returns: {Source} rendered chunk modules in a Source object or null if no modules

webpack.Template.renderChunkRuntimeModules(runtimeModules, renderContext): void
  • runtimeModules {RuntimeModule[]} array of runtime modules in order
  • renderContext {RenderContextJavascriptModulesPlugin} render context
  • Returns: {Source} rendered chunk runtime modules in a Source object

webpack.Template.renderRuntimeModules(runtimeModules, renderContext): void
  • runtimeModules {RuntimeModule[]} array of runtime modules in order
  • renderContext <object> render context
  • Returns: {Source} rendered runtime modules in a Source object

webpack.Template.toComment(str): string
Attributes
string to be converted to commented in bundle code
Returns:<string>
returns a commented version of string

webpack.Template.toIdentifier(str): string
Attributes
the string converted to identifier
Returns:<string>
created identifier

webpack.Template.toNormalComment(str): string
Attributes
string to be converted to "normal comment"
Returns:<string>
returns a commented version of string

webpack.Template.toPath(str): string
Attributes
string path to be normalized
Returns:<string>
normalized bundle-safe path