On this page

Represents AbstractLibraryPlugin.

new AbstractLibraryPlugin(abstractLibraryPluginOptions): AbstractLibraryPlugin
Attributes
abstractLibraryPluginOptions:<AbstractLibraryPluginOptions>

Creates an instance of AbstractLibraryPlugin.

Attributes
COMMON_LIBRARY_NAME_MESSAGE:<string>
apply(compiler): void
Attributes
compiler:<Compiler>
the compiler instance
Returns:<void>

Applies the plugin by registering its hooks on the compiler.


chunkHash(chunk, hash, chunkHashContext, libraryContext): void
Attributes
chunk:<Chunk>
the chunk
hash:<Hash>
hash
chunkHashContext:<ChunkHashContext>
chunk hash context
libraryContext:<LibraryContext>
< <T> > context
Returns:<void>

Processes the provided chunk.


embedInRuntimeBailout(module, renderContext, libraryContext): string | undefined
Attributes
module:<Module>
the exporting entry module
render context
libraryContext:<LibraryContext>
< <T> > context
bailout reason

Embed in runtime bailout.


finishEntryModule(module, entryName, libraryContext): void
Attributes
module:<Module>
the exporting entry module
entryName:<string>
the name of the entrypoint
libraryContext:<LibraryContext>
< <T> > context
Returns:<void>

Finish entry module.


parseOptions(library): T
Attributes
normalized library option
Returns:
{T} preprocess as needed by overriding

Returns preprocess as needed by overriding.


render(source, renderContext, libraryContext): Source
Attributes
source:<Source>
source
render context
libraryContext:<LibraryContext>
< <T> > context
Returns:<Source>
source with library export

Returns source with library export.


renderModuleContent(source, module, renderContext, libraryContext): Source
Attributes
source:<Source>
source
module:<Module>
module
renderContext:<ModuleRenderContext>
render context
libraryContext:
<Omit> < <LibraryContext> < <T> >, <"options"> > context
Returns:<Source>
source with library export

Renders module content.


renderStartup(source, module, renderContext, libraryContext): Source
Attributes
source:<Source>
source
module:<Module>
module
render context
libraryContext:<LibraryContext>
< <T> > context
Returns:<Source>
source with library export

Renders source with library export.


runtimeRequirements(chunk, set, libraryContext): void
Attributes
chunk:<Chunk>
the chunk
set:<Set>
< <string> > runtime requirements
libraryContext:<LibraryContext>
< <T> > context
Returns:<void>

Processes the provided chunk.


strictRuntimeBailout(renderContext, libraryContext): string | undefined
Attributes
render context
libraryContext:<LibraryContext>
< <T> > context
bailout reason

Strict runtime bailout.

Attributes
pluginName:<string>
name of the plugin
used library type

Attributes
chunkGraph:<ChunkGraph>
compilation:<Compilation>
options:
{T}