Frank
📢 UpdateIn v0.43.0, you can now deploy your Next.js app to your AWS account along with the rest of your infrastructure. Similar to the StaticSite construct,
sst.NextjsSite
will
• build and deploy the app to an S3 bucket;
• setup a CloudFront CDN for fast content delivery;
• setup Lambda@Edge functions to handle routing, SSG, SSR, API routes, ISR, Image optimization, etc;
• configure custom domain;
• configure resources outputs as NEXT_PUBLIC_
environment variables
new NextjsSite(this, "NextSite", {
path: "path/to/site",
environment: {
NEXT_PUBLIC_API_URL: api.url,
},
});
Here are some more examples.Alex Price
09/16/2021, 12:14 PMSimon Reilly
09/16/2021, 12:22 PMFrank
Alex Price
09/16/2021, 12:30 PMAshishkumar Pandey
09/16/2021, 12:30 PMFrank
NextjsSite
is partially relying on @serverless-nextjs/lambda-at-edge
for building the Lambda@Edge part. I’m sure you know better 😁Frank
Ashishkumar Pandey
09/16/2021, 12:42 PMFrank
Ashishkumar Pandey
09/16/2021, 12:55 PMAshishkumar Pandey
09/16/2021, 1:01 PMSimon Reilly
09/16/2021, 1:03 PMAshishkumar Pandey
09/16/2021, 1:05 PMmax.suster
09/16/2021, 3:35 PMYousef
09/16/2021, 4:59 PMYeltrah
09/27/2021, 5:06 AMYousef
09/27/2021, 1:43 PMYeltrah
09/27/2021, 1:54 PMYousef
09/27/2021, 1:58 PMYeltrah
09/27/2021, 2:14 PMYousef
09/27/2021, 2:15 PM