On this page

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

Applies the plugin by registering its hooks on the compiler.


renderBootstrap(renderContext, hooks): void
  • renderContext {RenderBootstrapContext}
  • hooks {CompilationHooksJavascriptModulesPlugin}
  • Returns: {Bootstrap}

Renders the generated source of the bootstrap code.


renderChunk(renderContext, hooks): void
  • renderContext {RenderContextJavascriptModulesPlugin}
  • hooks {CompilationHooksJavascriptModulesPlugin}
  • Returns: <Source>

Renders the rendered source.


renderMain(renderContext, hooks, compilation): void
  • renderContext {MainRenderContext}
  • hooks {CompilationHooksJavascriptModulesPlugin}
  • compilation <Compilation>
  • Returns: <Source>

Renders the newly generated source from rendering.


renderModule(module, renderContext, hooks): Source | null
Attributes
module:<Module>
renderContext:
{ModuleRenderContext}
hooks:
{CompilationHooksJavascriptModulesPlugin}
Returns:<Source> | <null>

Renders the newly generated source from rendering.


renderRequire(renderContext, hooks): void
  • renderContext {RenderBootstrapContext}
  • hooks {CompilationHooksJavascriptModulesPlugin}
  • Returns: <string>

Renders the generated source of the require function.


updateHashWithBootstrap(hash, renderContext, hooks): void
  • hash {Hash}
  • renderContext {RenderBootstrapContext}
  • hooks {CompilationHooksJavascriptModulesPlugin}
  • Returns: {void}

Updates hash with bootstrap.


Attributes
chunk:<Chunk>
outputOptions:
{OutputNormalizedWithDefaults}
Returns:
{ChunkFilenameTemplate}

Gets chunk filename template.


Attributes
compilation:<Compilation>
Returns:
{CompilationHooksJavascriptModulesPlugin}

Returns the attached hooks.