On this page

new JavascriptModulesPlugin(options?): JavascriptModulesPlugin
Attributes
options:<object>
Attributes
options:<object>
chunkHasJs:<object>
apply(compiler): void
Attributes
compiler:<Compiler>
the compiler instance
Returns:
{void}

Apply the plugin


renderBootstrap(renderContext, hooks): void
  • renderContext {RenderBootstrapContext} options object
  • hooks {CompilationHooksJavascriptModulesPlugin} hooks
  • Returns: {Bootstrap} the generated source of the bootstrap code

renderChunk(renderContext, hooks): void
  • renderContext {RenderContextJavascriptModulesPlugin} the render context
  • hooks {CompilationHooksJavascriptModulesPlugin} hooks
  • Returns: <Source> the rendered source

renderMain(renderContext, hooks, compilation): void
  • renderContext {MainRenderContext} options object
  • hooks {CompilationHooksJavascriptModulesPlugin} hooks
  • compilation <Compilation> the compilation
  • Returns: <Source> the newly generated source from rendering

renderModule(module, renderContext, hooks): Source | null
Attributes
module:<Module>
the rendered module
renderContext:
{ModuleRenderContext} options object
hooks:
{CompilationHooksJavascriptModulesPlugin} hooks
Returns:<Source> | <null>
the newly generated source from rendering

renderRequire(renderContext, hooks): void
  • renderContext {RenderBootstrapContext} options object
  • hooks {CompilationHooksJavascriptModulesPlugin} hooks
  • Returns: <string> the generated source of the require function

updateHashWithBootstrap(hash, renderContext, hooks): void
  • hash {Hash} the hash to be updated
  • renderContext {RenderBootstrapContext} options object
  • hooks {CompilationHooksJavascriptModulesPlugin} hooks
  • Returns: {void}

Attributes
chunk:<Chunk>
chunk
outputOptions:
{OutputNormalizedWithDefaults} output options
used filename template

Attributes
compilation:<Compilation>
the compilation
Returns:
{CompilationHooksJavascriptModulesPlugin} the attached hooks