-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem being solved
Next.js includes features that rely on serverless infrastructure, such as middleware, image optimization, and server-side rendering (SSR). Since Next.js is closely integrated with Vercel's infrastructure, these features are not natively supported elsewhere. As a solution, OpenNext can be used, which leverages AWS Lambda (or any other cloud serverless compute) to deploy Next.js builds.
Proposal
export class WebStack extends Construct {
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);
const nextjs = new Nextjs(this, 'Nextjs', {
nextjsPath: './web',
});
new CfnOutput(this, "CloudFrontDistributionDomain", {
value: nextjs.distribution.distributionDomain,
});
}
}Snippet taken from: https://github.com/jetbridge/cdk-nextjs
This construct doesn't support OpenNext v3, hence we'd probably have to go for our own implementation instead of re-using it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request