On this page

Source Code: lib/javascript/JavascriptModulesPlugin.js#L491
new JavascriptModulesPlugin(options?): JavascriptModulesPlugin
Source Code: lib/javascript/JavascriptModulesPlugin.js#L492
Attributes
Source Code: lib/javascript/JavascriptModulesPlugin.js#L493
Type:object
JavascriptModulesPlugin.chunkHasJs(chunk, chunkGraph): boolean
Attributes
chunk:Chunk
chunkGraph:ChunkGraph
Returns:boolean
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:Compilation
Returns:{ 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
Source Code: lib/javascript/JavascriptModulesPlugin.js#L503
Attributes
compiler:Compiler

Applies the plugin by registering its hooks on the compiler.

javascriptModulesPlugin.renderBootstrap(renderContext, hooks): Bootstrap
Source Code: lib/javascript/JavascriptModulesPlugin.js#L1574
Attributes
hooks:Object
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>
Returns:Bootstrap

Renders the generated source of the bootstrap code.

javascriptModulesPlugin.renderChunk(renderContext, hooks): Source
Source Code: lib/javascript/JavascriptModulesPlugin.js#L1002
Attributes
hooks:Object
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>
Returns:Source

Renders the rendered source.

javascriptModulesPlugin.renderMain(renderContext, hooks, compilation): Source
Source Code: lib/javascript/JavascriptModulesPlugin.js#L1188
Attributes
renderContext:MainRenderContext
hooks:Object
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>
compilation:Compilation
Returns:Source

Renders the newly generated source from rendering.

javascriptModulesPlugin.renderModule(module, renderContext, hooks): Source | null
Source Code: lib/javascript/JavascriptModulesPlugin.js#L863
Attributes
module:Module
renderContext:ModuleRenderContext
hooks:Object
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>
Returns:Source | null

Renders the newly generated source from rendering.

javascriptModulesPlugin.renderRequire(renderContext, hooks): string
Source Code: lib/javascript/JavascriptModulesPlugin.js#L1944
Attributes
hooks:Object
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>
Returns:string

Renders the generated source of the require function.

javascriptModulesPlugin.updateHashWithBootstrap(hash, renderContext, hooks): void
Source Code: lib/javascript/JavascriptModulesPlugin.js#L1553
Attributes
hash:Hash
hooks:Object
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>

Updates hash with bootstrap.

JavascriptModulesPlugin.getChunkFilenameTemplate(chunk, outputOptions): ChunkFilenameTemplate
Source Code: lib/javascript/JavascriptModulesPlugin.js#L839
Attributes

Gets chunk filename template.