On this page

new JavascriptModulesPlugin(options?): JavascriptModulesPlugin
Attributes
Attributes
options:<object>
chunkHasJs:<Function>
Returns true, when a JS file is needed for this chunk.
apply(compiler): void
Attributes
compiler:<Compiler>
the compiler instance
Returns:<void>

Applies the plugin by registering its hooks on the compiler.


renderBootstrap(renderContext, hooks): Bootstrap
Attributes
options object
Returns:<Bootstrap>
the generated source of the bootstrap code

Renders the generated source of the bootstrap code.


renderChunk(renderContext, hooks): Source
Attributes
the render context
Returns:<Source>
the rendered source

Renders the rendered source.


renderMain(renderContext, hooks, compilation): Source
Attributes
renderContext:<MainRenderContext>
options object
compilation:<Compilation>
the compilation
Returns:<Source>
the newly generated source from rendering

Renders the newly generated source from rendering.


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

Renders the newly generated source from rendering.


renderRequire(renderContext, hooks): string
Attributes
options object
Returns:<string>
the generated source of the require function

Renders the generated source of the require function.


updateHashWithBootstrap(hash, renderContext, hooks): void
Attributes
hash:<Hash>
the hash to be updated
options object
Returns:<void>

Updates hash with bootstrap.


Attributes
chunk:<Chunk>
chunk
output options
used filename template

Gets chunk filename template.


Attributes
compilation:<Compilation>
the compilation

Returns the attached hooks.

Attributes
afterStartup:<string>
[]
allowInlineStartup:<boolean>
beforeStartup:<string>
[]
header:<string>
[]
startup:<string>
[]


Attributes
chunk:<Chunk>
the chunk
chunkGraph:<ChunkGraph>
the chunk graph
codeGenerationResults:<CodeGenerationResults>
results of code generation
dependencyTemplates:<DependencyTemplates>
the dependency templates
hash to be used for render call
moduleGraph:<ModuleGraph>
the module graph
runtimeTemplate:<RuntimeTemplate>
the runtime template
strictMode:<boolean>
rendering in strict context