new HtmlModulesPlugin(): HtmlModulesPlugin
Returns:
HtmlModulesPluginAttributes
getCompilationHooks:
(compilation: Compilation) => { htmlEmitted: AsyncSeriesHook<[HtmlEmittedContext]>; injectTags: AsyncSeriesWaterfallHook<[HtmlTagDescriptor[], HtmlInjectTagsContext], HtmlTagDescriptor[]>; transformHtml: AsyncSeriesWaterfallHook<[string, HtmlTransformHtmlContext], string>; transformTags: AsyncSeriesHook<[HtmlMutableTag[], HtmlTransformTagsContext]> }Per-compilation hooks for the experimental HTML support.
apply(compiler): void
Attributes
Applies the plugin by registering its hooks on the compiler.
Attributes
output.hashFunction/hashSalt/hashDigest/hashDigestLength
digest of content, with nonNumericOnlyHash applied — webpack's
standard [contenthash] recipe.
Attributes
chunk:
Chunkchunk
outputOptions:
Outputoutput options
Returns:
ChunkFilenameTemplateused filename template
Filename template for an extracted HTML page: output.htmlFilename for
initial chunks, output.htmlChunkFilename otherwise — the HTML counterpart
of CssModulesPlugin.getChunkFilenameTemplate.
Attributes
outputName:
stringAttributes
Attributes
mutable attributes; a string value renders
name="value"
,
true
a bare attribute,
false
/
undefined
/deleting the key drops itinjectTo:
"body" | "head" | "head-prepend" | "body-prepend"the tag's current region (
"head"
/
"body"
); set a different value to move it there (
*-prepend
to the region's start)remove:
booleanset true to delete the whole element
tag:
stringthe (lowercased) tag name
Attributes
attributes;
true
renders a bare boolean attribute,
false
/
undefined
is omittedchildren:
stringinner content (ignored for void elements like
<link>
/
<meta>
)injectTo:
"body" | "head" | "head-prepend" | "body-prepend"placement; defaults to
"head"tag:
stringtag name, e.g.
"script"
/
"link"
/
"meta"voidTag:
booleanforce a void element (no closing tag); inferred from the tag name when omitted
Attributes
outputName:
stringAttributes