new VirtualUrlPlugin(modules, schemeOrOptions?): VirtualUrlPluginAttributes
modules:
<VirtualModules>The virtual modules
schemeOrOptions:
<string>
|
<Omit><
<VirtualUrlOptions>
,
<"modules">
> The URL scheme to useReturns:
<VirtualUrlPlugin>Creates an instance of VirtualUrlPlugin.
Attributes
context:
<string>modules:
<NormalizedModules>options:
<VirtualUrlOptions>scheme:
<string>DEFAULT_SCHEME:
<string>apply(compiler): voidAttributes
compiler:
<Compiler>the compiler instance
Returns:
<void>Applies the plugin by registering its hooks on the compiler.
findVirtualModuleConfigById(id): VirtualModuleAttributes
id:
<string>The module id
Returns:
<VirtualModule>The virtual module config
Finds virtual module config by id.
getCacheVersion(version): string | undefinedAttributes
Returns:
<string>
|
<undefined>The cache version
Get the cache version for a given version value
Type:
{NormalModuleLoaderContext
& LoaderRunnerLoaderContext
& 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:
{(loaderContext: LoaderContext
) => string | Buffer
| Promise<string | Buffer
>} The source function that provides the virtual content.
type:
<string>The module type.
Type:
{string | ((loaderContext: LoaderContext
) => string | Buffer | Promise<string | Buffer>) | VirtualModule}
[index: {string}]<VirtualModuleContent>
Options for building virtual resources.
Attributes