cdk-nextjs-standalone
Version:
Deploy a NextJS app to AWS using CDK and OpenNext.
42 lines (41 loc) • 1.45 kB
TypeScript
import type { NextjsBuild, NextjsStaticAssetOverrides } from '../';
import type { aws_s3 } from 'aws-cdk-lib';
/**
* OptionalNextjsStaticAssetsProps
*/
export interface OptionalNextjsStaticAssetsProps {
/**
* If `true` (default), then removes old static assets after upload new static assets.
* @default true
* @stability stable
*/
readonly prune?: boolean;
/**
* Override props for every construct.
* @stability stable
*/
readonly overrides?: NextjsStaticAssetOverrides;
/**
* Custom environment variables to pass to the NextJS build and runtime.
* @stability stable
*/
readonly environment?: Record<string, string>;
/**
* Define your own bucket to store static assets.
* @stability stable
*/
readonly bucket?: aws_s3.IBucket;
/**
* Optional value to prefix the Next.js site under a /prefix path on CloudFront. Usually used when you deploy multiple Next.js sites on same domain using /sub-path.
* Note, you'll need to set [basePath](https://nextjs.org/docs/app/api-reference/next-config-js/basePath)
* in your `next.config.ts` to this value and ensure any files in `public`
* folder have correct prefix.
* @stability stable
*/
readonly basePath?: string;
/**
* The `NextjsBuild` instance representing the built Nextjs application.
* @stability stable
*/
readonly nextBuild?: NextjsBuild;
}