On this page

new ProvideSharedPlugin(options): ProvideSharedPlugin
Attributes

Creates an instance of ProvideSharedPlugin.

Attributes
apply(compiler): void
Attributes
compiler:Compiler
the compiler instance
Returns:void

Applies the plugin by registering its hooks on the compiler.


Advanced configuration for modules that should be provided as shared modules to the share scope.

Attributes
eager:boolean
Include the provided module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.
shareKey:string
Key in the share scope under which the shared modules should be stored.
shareScope:string
Share scope name.
version:string | false
Version of the provided module. Will replace lower matching versions, but not higher.

Attributes
provides:Provides
Modules that should be provided as shared modules to the share scope. When provided, property name is used to match modules, otherwise this is automatically inferred from share key.
shareScope:string
Share scope name used for all provided modules (defaults to 'default').

Modules that should be provided as shared modules to the share scope. Property names are used as share keys.