On this page

new AbstractLibraryPlugin(__namedParameters): AbstractLibraryPlugin< T >
Attributes
Returns:
{AbstractLibraryPlugin< T >}

Creates an instance of AbstractLibraryPlugin.

Attributes
COMMON_LIBRARY_NAME_MESSAGE:<string>
apply(compiler): void
Attributes
compiler:<Compiler>
Returns:
{void}

Applies the plugin by registering its hooks on the compiler.


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

Processes the provided chunk.


embedInRuntimeBailout(module, renderContext, libraryContext): string | undefined
Attributes
module:<Module>
libraryContext:
{LibraryContext< T >}

Embed in runtime bailout.


finishEntryModule(module, entryName, libraryContext): void
Attributes
module:<Module>
entryName:<string>
libraryContext:
{LibraryContext< T >}
Returns:
{void}

Finish entry module.


parseOptions(library): T
Attributes
Returns:
{T}

Returns preprocess as needed by overriding.


render(source, renderContext, libraryContext): Source
Attributes
source:<Source>
libraryContext:
{LibraryContext< T >}
Returns:<Source>

Returns source with library export.


renderModuleContent(source, module, renderContext, libraryContext): Source
Attributes
source:<Source>
module:<Module>
renderContext:<ModuleRenderContext>
libraryContext:
{Omit< LibraryContext< T >, "options" >}
Returns:<Source>

Renders module content.


renderStartup(source, module, renderContext, libraryContext): Source
Attributes
source:<Source>
module:<Module>
renderContext:
{StartupRenderContext}
libraryContext:
{LibraryContext< T >}
Returns:<Source>

Renders source with library export.


runtimeRequirements(chunk, set, libraryContext): void
Attributes
chunk:<Chunk>
set:
{Set< string >}
libraryContext:
{LibraryContext< T >}
Returns:
{void}

Processes the provided chunk.


strictRuntimeBailout(renderContext, libraryContext): string | undefined
Attributes
libraryContext:
{LibraryContext< T >}

Strict runtime bailout.