npm @serverless-stack/cli 0.63.0
v0.63.0

latest releases: 1.18.4, 1.18.3, 1.18.2...
2 years ago

Major changes to NextjsSite

The NextjsSite construct uses the @sls-next/lambda-at-edge package from the serverless-next.js project to build and package your Next.js app to a structure that can be deployed to Lambda@Edge and CloudFront.

Prior to this release, SST used to include the @sls-next/lambda-at-edge package as a dependency. It caused two problems:

  1. You cannot use a different version of @sls-next/lambda-at-edge
  2. @sls-next/lambda-at-edge is installed even if you are not using the NextjsSite construct

Starting with this release, you are responsible for installing @sls-next/lambda-at-edge as a dependency in your SST app to use the NextjsSite construct.

What do I need to do

npm install -s @sls-next/lambda-at-edge
// or
yarn add @sls-next/lambda-at-edge

That's it! This should be a seamless transition for most people without any code changes. However, if you are hardcoding the bucket name, you need to change the name because this release will replace the bucket, and CloudFormation cannot replace it with the same name. For example, change this:

new NextjsSite(this, "Site", {
  path: "path/to/src",
  s3Bucket: {
    bucketName: "my-bucket",
  },
});

to

new NextjsSite(this, "Site", {
  path: "path/to/src",
  s3Bucket: {
    bucketName: "my-new-bucket",
  },
});

Update using:

$ npx sst update 0.63.0
$ yarn sst update 0.63.0

Don't miss a new cli release

NewReleases is sending notifications on new releases.