On this page

  • {HelperRuntimeModule}
new LoadScriptRuntimeModule(withCreateScriptUrl?, withFetchPriority?): LoadScriptRuntimeModule
Attributes
withCreateScriptUrl:<boolean>
use create script url for trusted types
withFetchPriority:<boolean>
use  fetchPriority attribute
Attributes
buildInfo:
{BuildInfo}
buildMeta:
{BuildMeta}
chunk:<Chunk>
chunkGraph:<ChunkGraph>
chunksIterable:
{Iterable }
codeGenerationDependencies:<Dependency[]>
compilation:<Compilation>
context:<string>
debugId:<number>
dependencies:<Dependency[]>
dependentHash:<boolean>
depth:<number>
errors:<any>
exportsArgument:<string>
factoryMeta:
{FactoryMeta}
fullHash:<boolean>
hasEqualsChunks:<any>
index:<number>
index2:<number>
issuer:<Module>
isUsed:<any>
layer:<string>
moduleArgument:<string>
needId:<boolean>
optimizationBailout:<string> | <object[]>
optional:<boolean>
parent:
{DependenciesBlock}
presentationalDependencies:<Dependency[]>
profile:
{ModuleProfile}
renderedHash:<string>
resolveOptions:<ResolveOptions>
stage:<number>
used:<any>
usedExports:
{boolean|SortableSet }
useSimpleSourceMap:<boolean>
useSourceMap:<boolean>
warnings:<any>
STAGE_ATTACH:<number>
Runtime modules which attach to handlers of other runtime modules
STAGE_BASIC:<number>
Runtime modules with simple dependencies on other runtime modules
STAGE_NORMAL:<number>
Runtime modules without any dependencies to other runtime modules
STAGE_TRIGGER:<number>
Runtime modules which trigger actions on bootstrap
webpack.runtime.LoadScriptRuntimeModule.addBlock(block): void
Attributes
Returns:
{void}

Adds a DependencyBlock to DependencyBlock relationship. This is used for when a Module has a AsyncDependencyBlock tie (for code-splitting)


webpack.runtime.LoadScriptRuntimeModule.addCacheDependencies(fileDependencies, contextDependencies, missingDependencies, buildDependencies): void
  • fileDependencies {LazySet}
  • contextDependencies {LazySet}
  • missingDependencies {LazySet}
  • buildDependencies {LazySet}
  • Returns: {void}

webpack.runtime.LoadScriptRuntimeModule.addChunk(chunk): boolean
Attributes
chunk:<Chunk>
Returns:<boolean>

webpack.runtime.LoadScriptRuntimeModule.addCodeGenerationDependency(codeGenerationDependency): void
Attributes
codeGenerationDependency:<Dependency>
Returns:
{void}

webpack.runtime.LoadScriptRuntimeModule.addDependency(dependency): void
Attributes
dependency:<Dependency>
Returns:
{void}

webpack.runtime.LoadScriptRuntimeModule.addError(error): void
Attributes
Returns:
{void}

webpack.runtime.LoadScriptRuntimeModule.addPresentationalDependency(presentationalDependency): void
Attributes
presentationalDependency:<Dependency>
Returns:
{void}

webpack.runtime.LoadScriptRuntimeModule.addWarning(warning): void
Attributes
Returns:
{void}

webpack.runtime.LoadScriptRuntimeModule.attach(compilation, chunk, chunkGraph?): void
Attributes
compilation:<Compilation>
chunk:<Chunk>
chunkGraph:<ChunkGraph>
Returns:
{void}

webpack.runtime.LoadScriptRuntimeModule.build(options, compilation, resolver, fs, callback): void

webpack.runtime.LoadScriptRuntimeModule.chunkCondition(chunk, compilation): boolean
Attributes
chunk:<Chunk>
compilation:<Compilation>
Returns:<boolean>

webpack.runtime.LoadScriptRuntimeModule.cleanupForCache(): void
Returns:
{void}

Assuming this module is in the cache. Remove internal references to allow freeing some memory.


webpack.runtime.LoadScriptRuntimeModule.clearDependenciesAndBlocks(): void
Returns:
{void}

Removes all dependencies and blocks


webpack.runtime.LoadScriptRuntimeModule.clearWarningsAndErrors(): void
Returns:
{void}

removes all warnings and errors


webpack.runtime.LoadScriptRuntimeModule.codeGeneration(context): void
  • context {CodeGenerationContext}
  • Returns: {CodeGenerationResult}

webpack.runtime.LoadScriptRuntimeModule.deserialize(__namedParameters): void
Attributes
__namedParameters:<ObjectDeserializerContext>
Returns:
{void}

webpack.runtime.LoadScriptRuntimeModule.generate(): string
Returns:<string>
runtime code

webpack.runtime.LoadScriptRuntimeModule.getChunks(): Chunk[]
Returns:<Chunk[]>

webpack.runtime.LoadScriptRuntimeModule.getConcatenationBailoutReason(context): void
  • context {ConcatenationBailoutReasonContext}
  • Returns: <string>

webpack.runtime.LoadScriptRuntimeModule.getErrors(): Iterable<WebpackError, any, any>
Returns:
{Iterable<WebpackError, any, any>}

webpack.runtime.LoadScriptRuntimeModule.getExportsType(moduleGraph, strict?): ExportsType
Attributes
moduleGraph:<ModuleGraph>
strict:<boolean>
Returns:
{ExportsType}

webpack.runtime.LoadScriptRuntimeModule.getGeneratedCode(): string
Returns:<string>

webpack.runtime.LoadScriptRuntimeModule.getNumberOfChunks(): number
Returns:<number>

webpack.runtime.LoadScriptRuntimeModule.getNumberOfErrors(): number
Returns:<number>

webpack.runtime.LoadScriptRuntimeModule.getNumberOfWarnings(): number
Returns:<number>

webpack.runtime.LoadScriptRuntimeModule.getRootBlock(): DependenciesBlock
Returns:
{DependenciesBlock}

webpack.runtime.LoadScriptRuntimeModule.getSideEffectsConnectionState(moduleGraph): ConnectionState
Attributes
moduleGraph:<ModuleGraph>
Returns:
{ConnectionState}

webpack.runtime.LoadScriptRuntimeModule.getSourceBasicTypes(): ReadonlySet<string>
Returns:
{ReadonlySet }

Basic source types are high-level categories like javascript, css, webassembly, etc. We only have built-in knowledge about the javascript basic type here; other basic types may be added or changed over time by generators and do not need to be handled or detected here. Some modules, e.g. RemoteModule, may return non-basic source types like "remote" and "share-init" from getSourceTypes(), but their generated output is still JavaScript, i.e. their basic type is JS.


webpack.runtime.LoadScriptRuntimeModule.getSourceTypes(): ReadonlySet<string>
Returns:
{ReadonlySet }

webpack.runtime.LoadScriptRuntimeModule.getUnsafeCacheData(): UnsafeCacheData
Returns:
{UnsafeCacheData}

Module should be unsafe cached. Get data that's needed for that. This data will be passed to restoreFromUnsafeCache later.


webpack.runtime.LoadScriptRuntimeModule.getWarnings(): Iterable<WebpackError, any, any>
Returns:
{Iterable<WebpackError, any, any>}

webpack.runtime.LoadScriptRuntimeModule.hasChunkCondition(): boolean
Returns:<boolean>

webpack.runtime.LoadScriptRuntimeModule.hasReasonForChunk(chunk, moduleGraph, chunkGraph): boolean
Attributes
chunk:<Chunk>
moduleGraph:<ModuleGraph>
chunkGraph:<ChunkGraph>
Returns:<boolean>

webpack.runtime.LoadScriptRuntimeModule.hasReasons(moduleGraph, runtime): boolean
Attributes
moduleGraph:<ModuleGraph>
runtime:
{RuntimeSpec}
Returns:<boolean>

webpack.runtime.LoadScriptRuntimeModule.identifier(): string
Returns:<string>

webpack.runtime.LoadScriptRuntimeModule.invalidateBuild(): void
Returns:
{void}

webpack.runtime.LoadScriptRuntimeModule.isAccessibleInChunk(chunkGraph, chunk, ignoreChunk?): boolean
Attributes
chunkGraph:<ChunkGraph>
chunk:<Chunk>
ignoreChunk:<Chunk>
Returns:<boolean>

webpack.runtime.LoadScriptRuntimeModule.isAccessibleInChunkGroup(chunkGraph, chunkGroup, ignoreChunk?): boolean
Attributes
chunkGraph:<ChunkGraph>
chunkGroup:<ChunkGroup>
ignoreChunk:<Chunk>
Returns:<boolean>

webpack.runtime.LoadScriptRuntimeModule.isEntryModule(): boolean
Returns:<boolean>

webpack.runtime.LoadScriptRuntimeModule.isInChunk(chunk): boolean
Attributes
chunk:<Chunk>
Returns:<boolean>

webpack.runtime.LoadScriptRuntimeModule.isOptional(moduleGraph): boolean
Attributes
moduleGraph:<ModuleGraph>
Returns:<boolean>

webpack.runtime.LoadScriptRuntimeModule.isProvided(exportName): boolean
Attributes
exportName:<string>
Returns:<boolean>

webpack.runtime.LoadScriptRuntimeModule.libIdent(options): void
  • options {LibIdentOptions}
  • Returns: <string>

webpack.runtime.LoadScriptRuntimeModule.nameForCondition(): string
Returns:<string>

webpack.runtime.LoadScriptRuntimeModule.needBuild(context, callback): void
  • context {NeedBuildContext}
  • callback <object>
  • Returns: {void}

webpack.runtime.LoadScriptRuntimeModule.needRebuild(fileTimestamps, contextTimestamps): void
Stability: 0Deprecated
  • fileTimestamps {Map<string, number>}
  • contextTimestamps {Map<string, number>}
  • Returns: <boolean>

Use needBuild instead


webpack.runtime.LoadScriptRuntimeModule.originalSource(): Source
Returns:<Source>

webpack.runtime.LoadScriptRuntimeModule.readableIdentifier(requestShortener): void
  • requestShortener {RequestShortener}
  • Returns: <string>

webpack.runtime.LoadScriptRuntimeModule.removeChunk(chunk): void
Attributes
chunk:<Chunk>
Returns:
{void}

webpack.runtime.LoadScriptRuntimeModule.removeDependency(dependency): void
Attributes
dependency:<Dependency>
Returns:
{void}

webpack.runtime.LoadScriptRuntimeModule.serialize(__namedParameters): void
Attributes
__namedParameters:<ObjectSerializerContext>
Returns:
{void}

webpack.runtime.LoadScriptRuntimeModule.shouldIsolate(): boolean
Returns:<boolean>

webpack.runtime.LoadScriptRuntimeModule.size(type?): number
Attributes
Returns:<number>

webpack.runtime.LoadScriptRuntimeModule.source(dependencyTemplates, runtimeTemplate, type?): void
Stability: 0Deprecated
  • dependencyTemplates {DependencyTemplates}
  • runtimeTemplate {RuntimeTemplate}
  • type <string>
  • Returns: <Source>

Use codeGeneration() instead


webpack.runtime.LoadScriptRuntimeModule.updateCacheModule(module): void
Attributes
module:<Module>
Returns:
{void}

Assuming this module is in the cache. Update the (cached) module with the fresh module from the factory. Usually updates internal references and properties.


webpack.runtime.LoadScriptRuntimeModule.updateHash(hash, context): void
  • hash {Hash}
  • context {UpdateHashContextDependency}
  • Returns: {void}

webpack.runtime.LoadScriptRuntimeModule.getCompilationHooks(compilation): LoadScriptCompilationHooks
Attributes
compilation:<Compilation>
the compilation
Returns:
{LoadScriptCompilationHooks} hooks

webpack.runtime.LoadScriptRuntimeModule.getSourceBasicTypes(module): ReadonlySet<string>
Stability: 0Deprecated
Attributes
module:<Module>
Returns:
{ReadonlySet }

In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.