On this page

new VirtualUrlPlugin(modules, schemeOrOptions?): VirtualUrlPlugin
Attributes
schemeOrOptions:<string> | <Omit>
< <VirtualUrlOptions> , <"modules"> >

Creates an instance of VirtualUrlPlugin.

Attributes
context:<string>
scheme:<string>
DEFAULT_SCHEME:<string>
apply(compiler): void
Attributes
compiler:<Compiler>
Returns:<void>

Applies the plugin by registering its hooks on the compiler.


findVirtualModuleConfigById(id): VirtualModule
Attributes

Finds virtual module config by id.


getCacheVersion(version): string | undefined
Attributes
version:<string> | <true> | <Function>

Get the cache version for a given version value



A virtual module definition.

Attributes
context:<string>
The context for the virtual module. A string path. Defaults to 'auto', which will try to resolve the context from the module id.
source:<Function>
The source function that provides the virtual content.
The module type.
version:<string> | <true> | <Function>
Optional version function or value for cache invalidation.



Options for building virtual resources.

Attributes
context:<string>
The default context for virtual modules. A string path. Defaults to 'auto', which will try to resolve the context from the module id.
modules:<object>
The virtual modules configuration.
scheme:<string>
The URL scheme to use for virtual resources.