These types are not exported by webpack, but they are available to TypeScript consumers.
new DependencyConstructor(...args?): DependencyAttributes
args:
any[]Returns:
DependencyAttributes
chunkGraph:
ChunkGraphthe chunk graph
chunkInitFragments:
InitFragment<GenerateContext>[]chunkInitFragments
codeGenerationResults:
CodeGenerationResultsthe code generation results
concatenationScope:
ConcatenationScopewhen in a concatenated module, information about other concatenated modules
dependencyTemplates:
DependencyTemplatesthe dependency templates
initFragments:
InitFragment<GenerateContext>[]mutable array of init fragments for the current module
module:
Modulecurrent module
moduleGraph:
ModuleGraphthe module graph
runtime:
RuntimeSpeccurrent runtimes, for which code is generated
runtimeTemplate:
RuntimeTemplatethe runtime template
Attributes
as:
stringthe
as
attribute; defaults to
script
for chunk/entry refschunk:
stringchunk name to hint
crossorigin:
boolean | "use-credentials" | "anonymous"CORS mode (
true
→
anonymous
)entry:
stringentrypoint name to hint (expands to one hint per initial chunk)
fetchPriority:
"auto" | "high" | "low"the
fetchpriority
attribute (allowed on
preload
/
modulepreload
/
prefetch
)href:
stringliteral URL (external,
preconnect
, or an already-hashed asset)integrity:
booleanSRI for a chunk/entry ref; follows
output.html.integrity
by default,
false
opts outmedia:
stringthe
media
attributehint relationship
type:
stringthe
type
attribute (MIME)Attributes
Returns array of values.
Attributes
loc:
stringAttributes
Attributes
Attributes
Type:
ResolveOptions & { dependencyType?: string; resolveToContext?: boolean }Attributes