On this page

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

Apply the plugin


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

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

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

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

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

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

webpack.JavascriptModulesPlugin.getChunkFilenameTemplate(chunk, outputOptions): TemplatePath
Attributes
chunk:<Chunk>
chunk
outputOptions:
{OutputNormalizedWithDefaults} output options
used filename template

webpack.JavascriptModulesPlugin.getCompilationHooks(compilation): CompilationHooksJavascriptModulesPlugin
Attributes
compilation:<Compilation>
the compilation
Returns:
{CompilationHooksJavascriptModulesPlugin} the attached hooks