next-banner
Version:
Generate Open Graph images for Next.js on build
120 lines (119 loc) • 5.01 kB
TypeScript
import { BannerConfig } from "./types";
import { NextConfig } from "next/types";
declare function getConfig(): Promise<BannerConfig>;
declare type CombinedConfig = {
nextBanner: Partial<BannerConfig>;
} & NextConfig;
/**
* Sets layout and custom data for the banner.
* @constructor
* @param {CombinedConfig} config - Next.js and Banner configuration
*/
declare function withNextBanner(config: CombinedConfig): {
webpack: (webpackConfig: any) => any;
publicRuntimeConfig: {
nextBannerOptions: {
domain: string;
excludePages: never[];
nextDir: string;
layoutDir: string;
outputDir: string;
width: number;
height: number;
concurrency: number;
};
};
nextBanner: Partial<BannerConfig>;
exportPathMap?: ((defaultMap: import("next/dist/server/config-shared").ExportPathMap, ctx: {
dev: boolean;
dir: string;
outDir: string | null;
distDir: string;
buildId: string;
}) => import("next/dist/server/config-shared").ExportPathMap | Promise<import("next/dist/server/config-shared").ExportPathMap>) | undefined;
i18n?: import("next/dist/server/config-shared").I18NConfig | null | undefined;
eslint?: import("next/dist/server/config-shared").ESLintConfig | undefined;
typescript?: import("next/dist/server/config-shared").TypeScriptConfig | undefined;
headers?: (() => Promise<import("next/dist/lib/load-custom-routes").Header[]>) | undefined;
rewrites?: (() => Promise<import("next/dist/lib/load-custom-routes").Rewrite[] | {
beforeFiles: import("next/dist/lib/load-custom-routes").Rewrite[];
afterFiles: import("next/dist/lib/load-custom-routes").Rewrite[];
fallback: import("next/dist/lib/load-custom-routes").Rewrite[];
}>) | undefined;
redirects?: (() => Promise<import("next/dist/lib/load-custom-routes").Redirect[]>) | undefined;
excludeDefaultMomentLocales?: boolean | undefined;
trailingSlash?: boolean | undefined;
env?: Record<string, string> | undefined;
distDir?: string | undefined;
cleanDistDir?: boolean | undefined;
assetPrefix?: string | undefined;
useFileSystemPublicRoutes?: boolean | undefined;
generateBuildId?: (() => string | Promise<string | null> | null) | undefined;
generateEtags?: boolean | undefined;
pageExtensions?: string[] | undefined;
compress?: boolean | undefined;
analyticsId?: string | undefined;
poweredByHeader?: boolean | undefined;
images?: Partial<import("next/dist/shared/lib/image-config").ImageConfigComplete> | undefined;
devIndicators?: {
buildActivity?: boolean | undefined;
buildActivityPosition?: "bottom-right" | "bottom-left" | "top-right" | "top-left" | undefined;
} | undefined;
onDemandEntries?: {
maxInactiveAge?: number | undefined;
pagesBufferLength?: number | undefined;
} | undefined;
amp?: {
canonicalBase?: string | undefined;
} | undefined;
basePath?: string | undefined;
sassOptions?: {
[key: string]: any;
} | undefined;
productionBrowserSourceMaps?: boolean | undefined;
optimizeFonts?: boolean | undefined;
reactStrictMode?: boolean | null | undefined;
serverRuntimeConfig?: {
[key: string]: any;
} | undefined;
httpAgentOptions?: {
keepAlive?: boolean | undefined;
} | undefined;
outputFileTracing?: boolean | undefined;
staticPageGenerationTimeout?: number | undefined;
crossOrigin?: false | "anonymous" | "use-credentials" | undefined;
swcMinify?: boolean | undefined;
compiler?: {
reactRemoveProperties?: boolean | {
properties?: string[] | undefined;
} | undefined;
relay?: {
src: string;
artifactDirectory?: string | undefined;
language?: "flow" | "typescript" | undefined;
} | undefined;
removeConsole?: boolean | {
exclude?: string[] | undefined;
} | undefined;
styledComponents?: boolean | {
displayName?: boolean | undefined;
topLevelImportPaths?: string[] | undefined;
ssr?: boolean | undefined;
fileName?: boolean | undefined;
meaninglessFileNames?: string[] | undefined;
minify?: boolean | undefined;
transpileTemplateLiterals?: boolean | undefined;
namespace?: string | undefined;
pure?: boolean | undefined;
cssProp?: boolean | undefined;
} | undefined;
emotion?: boolean | {
sourceMap?: boolean | undefined;
autoLabel?: "always" | "never" | "dev-only" | undefined;
labelFormat?: string | undefined;
} | undefined;
} | undefined;
output?: "standalone" | undefined;
experimental?: import("next/dist/server/config-shared").ExperimentalConfig | undefined;
};
export { getConfig, withNextBanner };