new ExternalModule(request, type, userRequest, dependencyMeta?): voidrequest{ExternalModuleRequest} requesttype{ExternalsType} typeuserRequest<string>user requestdependencyMeta{ImportDependencyMeta|CssImportDependencyMeta|AssetDependencyMeta} dependency meta- Returns:
<ExternalModule>
<AsyncDependenciesBlock[]><Dependency[]><string><number><Dependency[]><number><any><string><any><string><boolean><number><number><Module><any><string><string><boolean><string>
|
<object[]><boolean><Dependency[]><string><ResolveOptions><string><any><string><boolean><boolean><any><object>webpack.ExternalModule.addBlock(block): void<AsyncDependenciesBlock>Adds a DependencyBlock to DependencyBlock relationship. This is used for when a Module has a AsyncDependencyBlock tie (for code-splitting)
webpack.ExternalModule.addCacheDependencies(fileDependencies, contextDependencies, missingDependencies, buildDependencies): voidfileDependencies{LazySet} set where file dependencies are added to contextDependencies{LazySet} set where context dependencies are added to missingDependencies{LazySet} set where missing dependencies are added to buildDependencies{LazySet} set where build dependencies are added to - Returns: {void}
webpack.ExternalModule.addChunk(chunk): boolean<Chunk><boolean>webpack.ExternalModule.addCodeGenerationDependency(codeGenerationDependency): void<Dependency>webpack.ExternalModule.addDependency(dependency): void<Dependency>webpack.ExternalModule.addError(error): void<WebpackError>webpack.ExternalModule.addPresentationalDependency(presentationalDependency): void<Dependency>webpack.ExternalModule.addWarning(warning): void<WebpackError>webpack.ExternalModule.build(options, compilation, resolver, fs, callback): voidoptions{WebpackOptionsNormalizedWithDefaults} webpack optionscompilation<Compilation>the compilationresolver{ResolverWithOptions} the resolverfs<InputFileSystem>the file systemcallback<object>callback function- Returns: {void}
webpack.ExternalModule.chunkCondition(chunk, compilation): boolean<Chunk><Compilation><boolean>webpack.ExternalModule.cleanupForCache(): voidAssuming this module is in the cache. Remove internal references to allow freeing some memory.
webpack.ExternalModule.clearDependenciesAndBlocks(): voidRemoves all dependencies and blocks
webpack.ExternalModule.clearWarningsAndErrors(): voidremoves all warnings and errors
webpack.ExternalModule.codeGeneration(context): voidcontext{CodeGenerationContext} context for code generation- Returns: {CodeGenerationResult} result
webpack.ExternalModule.deserialize(__namedParameters): void<ObjectDeserializerContext>webpack.ExternalModule.getChunks(): Chunk[]<Chunk[]>webpack.ExternalModule.getConcatenationBailoutReason(context): voidcontext{ConcatenationBailoutReasonContext} context- Returns:
<string>reason why this module can't be concatenated, undefined when it can be concatenated
webpack.ExternalModule.getErrors(): Iterable<WebpackError, any, any>webpack.ExternalModule.getExportsType(moduleGraph, strict?): ExportsType<ModuleGraph><boolean>webpack.ExternalModule.getNumberOfChunks(): number<number>webpack.ExternalModule.getNumberOfErrors(): number<number>webpack.ExternalModule.getNumberOfWarnings(): number<number>webpack.ExternalModule.getRootBlock(): DependenciesBlockwebpack.ExternalModule.getSideEffectsConnectionState(moduleGraph): ConnectionState<ModuleGraph>webpack.ExternalModule.getSourceBasicTypes(): ReadonlySet<string>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.ExternalModule.getSourceTypes(): ReadonlySet<string>webpack.ExternalModule.getUnsafeCacheData(): UnsafeCacheDataModule should be unsafe cached. Get data that's needed for that. This data will be passed to restoreFromUnsafeCache later.
webpack.ExternalModule.getWarnings(): Iterable<WebpackError, any, any>webpack.ExternalModule.hasChunkCondition(): boolean<boolean>webpack.ExternalModule.hasReasonForChunk(chunk, moduleGraph, chunkGraph): boolean<boolean>webpack.ExternalModule.hasReasons(moduleGraph, runtime): boolean<ModuleGraph><boolean>webpack.ExternalModule.identifier(): string<string>webpack.ExternalModule.invalidateBuild(): voidwebpack.ExternalModule.isAccessibleInChunk(chunkGraph, chunk, ignoreChunk?): boolean<boolean>webpack.ExternalModule.isAccessibleInChunkGroup(chunkGraph, chunkGroup, ignoreChunk?): boolean<ChunkGraph><ChunkGroup><Chunk><boolean>webpack.ExternalModule.isEntryModule(): boolean<boolean>webpack.ExternalModule.isInChunk(chunk): boolean<Chunk><boolean>webpack.ExternalModule.isOptional(moduleGraph): boolean<ModuleGraph><boolean>webpack.ExternalModule.isProvided(exportName): boolean<string><boolean>webpack.ExternalModule.libIdent(options): voidoptions{LibIdentOptions} options- Returns:
<string>an identifier for library inclusion
webpack.ExternalModule.nameForCondition(): string<string>webpack.ExternalModule.needBuild(context, callback): voidcontext{NeedBuildContext} context infocallback<object>callback function, returns true, if the module needs a rebuild- Returns: {void}
webpack.ExternalModule.needRebuild(fileTimestamps, contextTimestamps): voidfileTimestamps{Map<string, number>}contextTimestamps{Map<string, number>}- Returns:
<boolean>
Use needBuild instead
webpack.ExternalModule.originalSource(): Source<Source>webpack.ExternalModule.readableIdentifier(requestShortener): voidrequestShortener{RequestShortener} the request shortener- Returns:
<string>a user readable identifier of the module
webpack.ExternalModule.removeChunk(chunk): void<Chunk>webpack.ExternalModule.removeDependency(dependency): void<Dependency>webpack.ExternalModule.restoreFromUnsafeCache(unsafeCacheData, normalModuleFactory): voidunsafeCacheData{UnsafeCacheData} data from getUnsafeCacheDatanormalModuleFactory{NormalModuleFactory} the normal module factory handling the unsafe caching- Returns: {void}
restore unsafe cache data
webpack.ExternalModule.serialize(__namedParameters): void<ObjectSerializerContext>webpack.ExternalModule.size(type?): number<string><number>webpack.ExternalModule.source(dependencyTemplates, runtimeTemplate, type?): voiddependencyTemplates{DependencyTemplates}runtimeTemplate{RuntimeTemplate}type<string>- Returns:
<Source>
Use codeGeneration() instead
webpack.ExternalModule.updateCacheModule(module): void<Module>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.ExternalModule.updateHash(hash, context): voidhash{Hash} the hash used to track dependenciescontext{UpdateHashContextDependency} context- Returns: {void}
webpack.ExternalModule.getCompilationHooks(compilation): ExternalModuleHooks<Compilation>webpack.ExternalModule.getSourceBasicTypes(module): ReadonlySet<string><Module>In webpack 6, call getSourceBasicTypes() directly on the module instance instead of using this static method.