Lambda deployments for Nextjs12 & Nextjs13 (standalone). Easy CLI commands to get your standalone Next output to run in AWS Lambda (not @Edge)! Uses CDK in behind and produces code zips importable to Terraform, Serverless, Azure, etc.
This PR allows users to specify an optional basePath which will be removed from request paths before the requests are passed to Nextjs within the server-handler lambda. This will allow for the server-handler lambda to be served on the same APIG as other lambdas without conflict, where each has a path prefix, e.g. /server and /image.
There is a PR of mine that been merged into serverless-http has not yet been released, which adds the basePath property into the Options Typescript type definition. Until that occurs, the rollup command fails because it performs Typescript checking. To avoid this failure, this PR adds a temporary @ts-ignore to ignore this issue. This line can be removed when the next version of serverless-http is released with my PR in it.
A new version of serverless-http has been release with my PR in it, which fixes the Typescript issue, so there is no need for the @ts-ignore workaround.
Fix #43
See #43 for detailed discussion of issue.
This PR allows users to specify an optional
basePath
which will be removed from request paths before the requests are passed to Nextjs within theserver-handler
lambda. This will allow for theserver-handler
lambda to be served on the same APIG as other lambdas without conflict, where each has a path prefix, e.g./server
and/image
.There is a PR of mine that been merged into
serverless-http
has not yet been released, which adds thebasePath
property into the Options Typescript type definition. Until that occurs, therollup
command fails because it performs Typescript checking. To avoid this failure, this PR adds a temporary@ts-ignore
to ignore this issue. This line can be removed when the next version ofserverless-http
is released with my PR in it.