Skip to content

makePreprocessBanner

Builds the banner injected at the top of every emitted bundle.

String(fn) captures only the function’s own body, so every shim the init function calls has to be serialized next to it and wrapped in one shared scope; otherwise the call it makes resolves against the consumer’s global scope at runtime. See this file’s @file remarks.

Import:

import { makePreprocessBanner } from '@mnaoumov/typescript-dev-toolkit/bundlers/esbuild-impl/preprocess-plugin';

Signature:

function makePreprocessBanner(options: MakePreprocessBannerOptions): string

Parameters:

Parameter Type Description
options MakePreprocessBannerOptions The banner options.

Returns: string — The banner source to prepend to the emitted bundle.


Links to this page: