On this page

new JavascriptModulesPlugin(options?): JavascriptModulesPlugin
Attributes
options:<object>
Returns:
{JavascriptModulesPlugin}
Attributes
options:<object>
chunkHasJs:<object>
webpack.JavascriptModulesPlugin.apply(compiler): void
  • 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): void
  • 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): void
  • chunk {Chunk} chunk
  • outputOptions {OutputNormalizedWithDefaults} output options
  • Returns: {TemplatePath} used filename template

webpack.JavascriptModulesPlugin.getCompilationHooks(compilation): void
  • compilation {Compilation} the compilation
  • Returns: {CompilationHooksJavascriptModulesPlugin} the attached hooks