new RuntimeTemplate(): RuntimeTemplateRuntimeTemplateCompilationstringstringOutputNormalizedWithDefaultsRequestShortenerassignOr(target, value): stringReturns a self-defaulting assignment, using the ||= logical assignment
operator when supported and falling back to target = target || value
otherwise. target is evaluated twice in the fallback, so it must be
side-effect free. The expression evaluates to the resulting value.
Models || only, so target must never hold a legitimate falsy value
(0, "", false) — it would be overwritten; use it for object/array defaults.
asyncModuleFactory({ block, chunkGraph, runtimeRequirements, request }): stringAsyncDependenciesBlockChunkGraphstringstringAsync module factory.
basicFunction(args, body): stringReturns basic function.
blockPromise({ block, message, chunkGraph, runtimeRequirements, originModule }): stringAsyncDependenciesBlockChunkGraphstringModuleimport()
is emitted intostringReturns expression.
comment({ request, chunkName, chunkReason, message, exportName }): stringReturns comment.
concatenation(...args?): stringReturns result expression.
cssServerStyleRegistry(): stringstringExpression for the global registry that collects CSS server-side when there
is no DOM (SSR). An SSR host reads it from globalThis; it is keyed by the
style/chunk identifier and namespaced by output.uniqueName.
defineEsModuleFlagStatement({ exportsArgument, runtimeRequirements }): stringDefine es module flag statement.
destructureArray(items, value): stringReturns destructure array code.
destructureObject(items, value): stringDestructure object.
emptyFunction(): stringstringReturns empty function code.
exportFromImport({ moduleGraph, chunkGraph, module, request, exportName, originModule, asiSafe, isCall, callContext, defaultInterop, importVar, initFragments, runtime, runtimeRequirements, dependency, mangleableNamespace }): stringbooleanboolean | nullChunkGraphbooleanModuleDependencystringInitFragment<GenerateContext>[]booleanbooleanModuleModuleGraphModulestringRuntimeSpecstringExport from import.
expressionFunction(expression, args?): stringExpression function.
forEach(variable, array, body): stringReturns for each code.
getBuiltinModule(request, access?): stringReads a node builtin via process.getBuiltinModule(), guarded to stay falsy off node so universal ["node", "web"] bundles don't crash (also falsy on node <22.3).
iife
iife(args, body): stringReturns iIFE code.
importStatement({ update, module, originModule, moduleGraph, chunkGraph, runtimeRequirements, importVar, request, weak, dependency }): [string, string]ChunkGraphModuleDependencystringModuleModuleGraphModulestringbooleanbooleanReturns the import statement and the compat statement.
isIIFE(): booleanbooleanisModule(): booleanbooleanisNeutralPlatform(): booleanbooleanisUniversalTarget(): booleanbooleanWhether the bundle targets node and web at once (universal ["node", "web"] + output.module), like isUniversalTarget in WebpackOptionsApply.
isWebLikePlatformExpression(): stringstringRuntime expression that is truthy in browser-like environments (a DOM
document or a worker self) and falsy in Node.js. Single source of
truth for branching a universal ("node-or-web") target at runtime.
method(prop, args, body): stringRenders an object-literal method, using method shorthand when supported
and falling back to a prop: function/arrow property otherwise.
missingModule({ request }): stringReturns generated error IIFE.
missingModulePromise({ request }): stringMissing module promise.
missingModuleStatement({ request }): stringMissing module statement.
moduleExports({ module, chunkGraph, request, weak, runtimeRequirements }): stringReturns the expression.
moduleId({ module, chunkGraph, request, weak }): stringChunkGraphModulestringbooleanstringReturns the expression.
moduleNamespace({ module, chunkGraph, request, strict, weak, runtimeRequirements }): stringReturns the expression.
moduleNamespacePromise({ chunkGraph, block, module, request, message, strict, weak, dependency, runtimeRequirements, originModule }): stringAsyncDependenciesBlockChunkGraphDependencystringModuleModuleimport()
is emitted intostringbooleanbooleanstringModule namespace promise.
moduleRaw({ module, chunkGraph, request, weak, runtimeRequirements }): stringReturns the expression.
objectHasOwn(object, property): stringReturns an own-property check, using Object.hasOwn when supported and
falling back to Object.prototype.hasOwnProperty.call otherwise.
optionalChaining(object, access): stringGuards an access/call on object with optional chaining when supported,
otherwise an equivalent && short-circuit. object is evaluated twice in
the fallback, so it must be side-effect free.
renderConst(): "const" | "let" | "var""const" | "let" | "var"Renders return const when it is supported, otherwise let when supported, otherwise var.
renderLet(): "let" | "var""let" | "var"Renders return let when it is supported, otherwise var.
renderNodePrefixForCoreModule(mod): stringRenders node prefix for core module.
returningFunction(returnValue, args?): stringReturning function.
runtimeConditionExpression({ chunkGraph, runtime, runtimeCondition, runtimeRequirements }): stringChunkGraphRuntimeSpecstring | boolean | SortableSet<string>stringRuntime condition expression.
supportNodePrefixForCoreModules(): booleanbooleansupportsAnalyzableEsm(): booleanbooleansupportsArrowFunction(): booleanbooleansupportsAsyncFunction(): booleanbooleansupportsBigIntLiteral(): booleanbooleansupportsConst(): booleanbooleansupportsDestructuring(): booleanbooleansupportsDynamicImport(): booleanbooleansupportsEcmaScriptModuleSyntax(): booleanbooleansupportsForOf(): booleanbooleansupportsGenerator(): booleanbooleansupportsLet(): booleanbooleansupportsLogicalAssignment(): booleanbooleansupportsMethodShorthand(): booleanbooleansupportsModulePreload(): booleanbooleansupportsObjectHasOwn(): booleanbooleansupportsOptionalChaining(): booleanbooleansupportsSpread(): booleanbooleansupportsSymbol(): booleanbooleansupportTemplateLiteral(): booleanbooleansyncModuleFactory({ dependency, chunkGraph, runtimeRequirements, request }): stringChunkGraphDependencystringstringSync module factory.
throwMissingModuleErrorBlock({ request }): stringThrow missing module error block.
throwMissingModuleErrorFunction({ request }): stringThrow missing module error function.
weakError({ chunkGraph, module, request, idExpr, type }): stringChunkGraphstringModulestring"promise" | "expression" | "statements"stringReturns the code.