new Template(): TemplateReturns:
<Template>Attributes
webpack.Template.asString(str): stringAttributes
str:
<string>
|
<string[]>string or string collection
Returns:
<string>returns a single string from array
webpack.Template.getFunctionContent(fn): voidfn{Stringable} a runtime function (.runtime.js) "template"- Returns:
<string>the updated and normalized function string
webpack.Template.getModulesArrayBounds(modules): voidmodules{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): stringAttributes
s:
<string>
|
<string[]>string to convert to identity
Returns:
<string>converted identity
webpack.Template.numberToIdentifier(n): stringAttributes
n:
<number>number to convert to ident
Returns:
<string>returns single character ident
webpack.Template.numberToIdentifierContinuation(n): stringAttributes
n:
<number>number to convert to ident
Returns:
<string>returns single character ident
webpack.Template.prefix(s, prefix): stringAttributes
s:
<string>
|
<string[]>string to create prefix for
prefix:
<string>prefix to compose
Returns:
<string>returns new prefix string
webpack.Template.renderChunkModules(renderContext, modules, renderModule, prefix?): voidrenderContext{ChunkRenderContextJavascriptModulesPlugin} render contextmodules<Module[]>modules to render (should be ordered by identifier)renderModule<object>function to render a moduleprefix<string>applying prefix strings- Returns:
<Source>rendered chunk modules in a Source object or null if no modules
webpack.Template.renderChunkRuntimeModules(runtimeModules, renderContext): SourceAttributes
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): SourceAttributes
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): stringAttributes
str:
<string>string to be converted to commented in bundle code
Returns:
<string>returns a commented version of string
webpack.Template.toIdentifier(str): stringAttributes
str:
<string>the string converted to identifier
Returns:
<string>created identifier
webpack.Template.toNormalComment(str): stringAttributes
str:
<string>string to be converted to "normal comment"
Returns:
<string>returns a commented version of string
webpack.Template.toPath(str): stringAttributes
str:
<string>string path to be normalized
Returns:
<string>normalized bundle-safe path