new JavascriptModulesPlugin(options?): JavascriptModulesPlugin
Attributes
options:
objectReturns:
JavascriptModulesPluginType:
objectJavascriptModulesPlugin.chunkHasJs(chunk, chunkGraph): boolean
Attributes
JavascriptModulesPlugin.getCompilationHooks(compilation): { chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>; embedInRuntimeBailout: SyncBailHook<[Module, RenderContextJavascriptModulesPlugin], string | void>; inlineInRuntimeBailout: SyncBailHook<[Module, Partial<RenderBootstrapContext>], string | void>; render: SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>; renderChunk: SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>; renderContent: SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>; renderMain: SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>; renderModuleContainer: SyncWaterfallHook<[Source, Module, ModuleRenderContext], Source>; renderModuleContent: SyncWaterfallHook<[Source, Module, ModuleRenderContext], Source>; renderModulePackage: SyncWaterfallHook<[Source, Module, ModuleRenderContext], Source>; renderRequire: SyncWaterfallHook<[string, RenderBootstrapContext], string>; renderStartup: SyncWaterfallHook<[Source, Module, StartupRenderContext], Source>; strictRuntimeBailout: SyncBailHook<[RenderContextJavascriptModulesPlugin], string | void>; useSourceMap: SyncBailHook<[Chunk, RenderContextJavascriptModulesPlugin], boolean | void> }
Attributes
compilation:
CompilationReturns:
{ chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>; embedInRuntimeBailout: SyncBailHook<[Module, RenderContextJavascriptModulesPlugin], string | void>; inlineInRuntimeBailout: SyncBailHook<[Module, Partial<RenderBootstrapContext>], string | void>; render: SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>; renderChunk: SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>; renderContent: SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>; renderMain: SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>; renderModuleContainer: SyncWaterfallHook<[Source, Module, ModuleRenderContext], Source>; renderModuleContent: SyncWaterfallHook<[Source, Module, ModuleRenderContext], Source>; renderModulePackage: SyncWaterfallHook<[Source, Module, ModuleRenderContext], Source>; renderRequire: SyncWaterfallHook<[string, RenderBootstrapContext], string>; renderStartup: SyncWaterfallHook<[Source, Module, StartupRenderContext], Source>; strictRuntimeBailout: SyncBailHook<[RenderContextJavascriptModulesPlugin], string | void>; useSourceMap: SyncBailHook<[Chunk, RenderContextJavascriptModulesPlugin], boolean | void> }javascriptModulesPlugin.apply(compiler): void
Attributes
compiler:
CompilerApplies the plugin by registering its hooks on the compiler.
javascriptModulesPlugin.renderBootstrap(renderContext, hooks): Bootstrap
Attributes
renderContext:
RenderBootstrapContexthooks:
ObjectchunkHash:
SyncHook<[Chunk, Hash, ChunkHashContext]>embedInRuntimeBailout:
SyncBailHook<[Module, RenderContextJavascriptModulesPlugin], string | void>inlineInRuntimeBailout:
SyncBailHook<[Module, Partial<RenderBootstrapContext>], string | void>render:
SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>renderChunk:
SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>renderContent:
SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>renderMain:
SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>renderModuleContainer:
SyncWaterfallHook<[Source, Module, ModuleRenderContext], Source>renderModuleContent:
SyncWaterfallHook<[Source, Module, ModuleRenderContext], Source>renderModulePackage:
SyncWaterfallHook<[Source, Module, ModuleRenderContext], Source>renderRequire:
SyncWaterfallHook<[string, RenderBootstrapContext], string>renderStartup:
SyncWaterfallHook<[Source, Module, StartupRenderContext], Source>strictRuntimeBailout:
SyncBailHook<[RenderContextJavascriptModulesPlugin], string | void>useSourceMap:
SyncBailHook<[Chunk, RenderContextJavascriptModulesPlugin], boolean | void>Returns:
BootstrapRenders the generated source of the bootstrap code.
javascriptModulesPlugin.renderChunk(renderContext, hooks): Source
Attributes
renderContext:
RenderContextJavascriptModulesPluginhooks:
ObjectchunkHash:
SyncHook<[Chunk, Hash, ChunkHashContext]>embedInRuntimeBailout:
SyncBailHook<[Module, RenderContextJavascriptModulesPlugin], string | void>inlineInRuntimeBailout:
SyncBailHook<[Module, Partial<RenderBootstrapContext>], string | void>render:
SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>renderChunk:
SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>renderContent:
SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>renderMain:
SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>renderModuleContainer:
SyncWaterfallHook<[Source, Module, ModuleRenderContext], Source>renderModuleContent:
SyncWaterfallHook<[Source, Module, ModuleRenderContext], Source>renderModulePackage:
SyncWaterfallHook<[Source, Module, ModuleRenderContext], Source>renderRequire:
SyncWaterfallHook<[string, RenderBootstrapContext], string>renderStartup:
SyncWaterfallHook<[Source, Module, StartupRenderContext], Source>strictRuntimeBailout:
SyncBailHook<[RenderContextJavascriptModulesPlugin], string | void>useSourceMap:
SyncBailHook<[Chunk, RenderContextJavascriptModulesPlugin], boolean | void>Returns:
SourceRenders the rendered source.
javascriptModulesPlugin.renderMain(renderContext, hooks, compilation): Source
Attributes
renderContext:
MainRenderContexthooks:
ObjectchunkHash:
SyncHook<[Chunk, Hash, ChunkHashContext]>embedInRuntimeBailout:
SyncBailHook<[Module, RenderContextJavascriptModulesPlugin], string | void>inlineInRuntimeBailout:
SyncBailHook<[Module, Partial<RenderBootstrapContext>], string | void>render:
SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>renderChunk:
SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>renderContent:
SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>renderMain:
SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>renderModuleContainer:
SyncWaterfallHook<[Source, Module, ModuleRenderContext], Source>renderModuleContent:
SyncWaterfallHook<[Source, Module, ModuleRenderContext], Source>renderModulePackage:
SyncWaterfallHook<[Source, Module, ModuleRenderContext], Source>renderRequire:
SyncWaterfallHook<[string, RenderBootstrapContext], string>renderStartup:
SyncWaterfallHook<[Source, Module, StartupRenderContext], Source>strictRuntimeBailout:
SyncBailHook<[RenderContextJavascriptModulesPlugin], string | void>useSourceMap:
SyncBailHook<[Chunk, RenderContextJavascriptModulesPlugin], boolean | void>compilation:
CompilationReturns:
SourceRenders the newly generated source from rendering.
javascriptModulesPlugin.renderModule(module, renderContext, hooks): Source | null
Attributes
module:
ModulerenderContext:
ModuleRenderContexthooks:
ObjectchunkHash:
SyncHook<[Chunk, Hash, ChunkHashContext]>embedInRuntimeBailout:
SyncBailHook<[Module, RenderContextJavascriptModulesPlugin], string | void>inlineInRuntimeBailout:
SyncBailHook<[Module, Partial<RenderBootstrapContext>], string | void>render:
SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>renderChunk:
SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>renderContent:
SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>renderMain:
SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>renderModuleContainer:
SyncWaterfallHook<[Source, Module, ModuleRenderContext], Source>renderModuleContent:
SyncWaterfallHook<[Source, Module, ModuleRenderContext], Source>renderModulePackage:
SyncWaterfallHook<[Source, Module, ModuleRenderContext], Source>renderRequire:
SyncWaterfallHook<[string, RenderBootstrapContext], string>renderStartup:
SyncWaterfallHook<[Source, Module, StartupRenderContext], Source>strictRuntimeBailout:
SyncBailHook<[RenderContextJavascriptModulesPlugin], string | void>useSourceMap:
SyncBailHook<[Chunk, RenderContextJavascriptModulesPlugin], boolean | void>Renders the newly generated source from rendering.
javascriptModulesPlugin.renderRequire(renderContext, hooks): string
Attributes
renderContext:
RenderBootstrapContexthooks:
ObjectchunkHash:
SyncHook<[Chunk, Hash, ChunkHashContext]>embedInRuntimeBailout:
SyncBailHook<[Module, RenderContextJavascriptModulesPlugin], string | void>inlineInRuntimeBailout:
SyncBailHook<[Module, Partial<RenderBootstrapContext>], string | void>render:
SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>renderChunk:
SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>renderContent:
SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>renderMain:
SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>renderModuleContainer:
SyncWaterfallHook<[Source, Module, ModuleRenderContext], Source>renderModuleContent:
SyncWaterfallHook<[Source, Module, ModuleRenderContext], Source>renderModulePackage:
SyncWaterfallHook<[Source, Module, ModuleRenderContext], Source>renderRequire:
SyncWaterfallHook<[string, RenderBootstrapContext], string>renderStartup:
SyncWaterfallHook<[Source, Module, StartupRenderContext], Source>strictRuntimeBailout:
SyncBailHook<[RenderContextJavascriptModulesPlugin], string | void>useSourceMap:
SyncBailHook<[Chunk, RenderContextJavascriptModulesPlugin], boolean | void>Returns:
stringRenders the generated source of the require function.
javascriptModulesPlugin.updateHashWithBootstrap(hash, renderContext, hooks): void
Attributes
hash:
HashrenderContext:
RenderBootstrapContexthooks:
ObjectchunkHash:
SyncHook<[Chunk, Hash, ChunkHashContext]>embedInRuntimeBailout:
SyncBailHook<[Module, RenderContextJavascriptModulesPlugin], string | void>inlineInRuntimeBailout:
SyncBailHook<[Module, Partial<RenderBootstrapContext>], string | void>render:
SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>renderChunk:
SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>renderContent:
SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>renderMain:
SyncWaterfallHook<[Source, RenderContextJavascriptModulesPlugin], Source>renderModuleContainer:
SyncWaterfallHook<[Source, Module, ModuleRenderContext], Source>renderModuleContent:
SyncWaterfallHook<[Source, Module, ModuleRenderContext], Source>renderModulePackage:
SyncWaterfallHook<[Source, Module, ModuleRenderContext], Source>renderRequire:
SyncWaterfallHook<[string, RenderBootstrapContext], string>renderStartup:
SyncWaterfallHook<[Source, Module, StartupRenderContext], Source>strictRuntimeBailout:
SyncBailHook<[RenderContextJavascriptModulesPlugin], string | void>useSourceMap:
SyncBailHook<[Chunk, RenderContextJavascriptModulesPlugin], boolean | void>Updates hash with bootstrap.
JavascriptModulesPlugin.getChunkFilenameTemplate(chunk, outputOptions): ChunkFilenameTemplate
Attributes
Gets chunk filename template.