new VirtualUrlPlugin(modules, schemeOrOptions?): VirtualUrlPluginAttributes
modules:
<VirtualModules>schemeOrOptions:
<string>
|
<Omit><
<VirtualUrlOptions>
,
<"modules">
>Returns:
<VirtualUrlPlugin>Creates an instance of VirtualUrlPlugin.
Attributes
context:
<string>modules:
<NormalizedModules>options:
<VirtualUrlOptions>scheme:
<string>DEFAULT_SCHEME:
<string>apply(compiler): voidAttributes
compiler:
<Compiler>Returns:
<void>Applies the plugin by registering its hooks on the compiler.
findVirtualModuleConfigById(id): VirtualModuleAttributes
id:
<string>Returns:
<VirtualModule>Finds virtual module config by id.
getCacheVersion(version): string | undefinedAttributes
version:
<string>
|
<true>
|
<Function>Returns:
<string>
|
<undefined>Get the cache version for a given version value
<
<OptionsType>
> &
<LoaderRunnerLoaderContext>
<
<OptionsType>
> &
<LoaderPluginLoaderContext>
&
<HotModuleReplacementPluginLoaderContext>[index: {string}]<VirtualModule>
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.
type:
<string>The module type.
version:
<string>
|
<true>
|
<Function>Optional version function or value for cache invalidation.
Type:
<string>
|
<Function>
|
<VirtualModule>[index: {string}]<VirtualModuleContent>
Options for building virtual resources.
Attributes