new JavascriptModulesPlugin(options?): JavascriptModulesPluginAttributes
options:
<object>Returns:
<JavascriptModulesPlugin>Attributes
options:
<object>chunkHasJs:
(chunk:
<Chunk>
, chunkGraph:
<ChunkGraph>
) =>
<boolean>
Returns true, when a JS file is needed for this chunk.apply(compiler): voidAttributes
compiler:
<Compiler>the compiler instance
Returns:
<void>Applies the plugin by registering its hooks on the compiler.
renderBootstrap(renderContext, hooks): BootstrapAttributes
renderContext:
<RenderBootstrapContext>options object
hooks
Returns:
<Bootstrap>the generated source of the bootstrap code
Renders the generated source of the bootstrap code.
renderChunk(renderContext, hooks): SourceAttributes
renderContext:
<RenderContextJavascriptModulesPlugin>the render context
hooks
Returns:
<Source>the rendered source
Renders the rendered source.
renderMain(renderContext, hooks, compilation): SourceAttributes
renderContext:
<MainRenderContext>options object
hooks
compilation:
<Compilation>the compilation
Returns:
<Source>the newly generated source from rendering
Renders the newly generated source from rendering.
renderModule(module, renderContext, hooks): Source | nullAttributes
Renders the newly generated source from rendering.
renderRequire(renderContext, hooks): stringAttributes
renderContext:
<RenderBootstrapContext>options object
hooks
Returns:
<string>the generated source of the require function
Renders the generated source of the require function.
updateHashWithBootstrap(hash, renderContext, hooks): voidAttributes
hash:
<Hash>the hash to be updated
renderContext:
<RenderBootstrapContext>options object
hooks
Returns:
<void>Updates hash with bootstrap.
Attributes
chunk:
<Chunk>chunk
outputOptions:
<OutputNormalizedWithDefaults>output options
Returns:
<ChunkFilenameTemplate>used filename template
Gets chunk filename template.
Attributes
compilation:
<Compilation>the compilation
the attached hooks
Returns the attached hooks.
Attributes
chunkHash<SyncHook><<[Chunk, Hash, ChunkHashContext]>>embedInRuntimeBailout<SyncBailHook><<[Module, RenderContextJavascriptModulesPlugin]>,<string>|<void>>inlineInRuntimeBailout{SyncBailHook<[Module, Partial], 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
chunk:
<Chunk>the chunk
chunkGraph:
<ChunkGraph>the chunk graph
codeGenerationResults:
<CodeGenerationResults>results of code generation
dependencyTemplates:
<DependencyTemplates>the dependency templates
hash:
<string>hash to be used for render call
moduleGraph:
<ModuleGraph>the module graph
runtimeTemplate:
<RuntimeTemplate>the runtime template
strictMode:
<boolean>rendering in strict context