Skip to content

Commit cf89f04

Browse files
Merge pull request #238342 from thomasgauvin/patch-3
Update deploy-nextjs-hybrid.md to improve deployment steps
2 parents 7d9d674 + 5549116 commit cf89f04

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

articles/static-web-apps/deploy-nextjs-hybrid.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Begin by initializing a new Next.js application.
3131
1. Initialize the application using `npm init`. If you are prompted to install `create-next-app`, say yes.
3232

3333
```bash
34-
npm init next-app@latest --typescript
34+
npm init next-app@next-12-3-2 --typescript
3535
```
3636

3737
1. When prompted for an app name, enter **nextjs-app**.
@@ -54,7 +54,17 @@ Begin by initializing a new Next.js application.
5454

5555
1. Stop the development server by pressing **CMD/CTRL + C**.
5656

57-
## Deploy your static website
57+
## Configure your Next.js app for deployment to Static Web Apps
58+
59+
To configure your Next.js app for deployment to Static Web Apps, enable the standalone feature for your Next.js project. This step reduces the size of your Next.js project to ensure it's below the size limits for Static Web Apps. Refer to the [standalone](#enable-standalone-feature) section for more information.
60+
61+
```js
62+
module.exports = {
63+
output: "standalone",
64+
}
65+
```
66+
67+
## Deploy your Next.js app
5868
5969
The following steps show how to link your app to Azure Static Web Apps. Once in Azure, you can deploy the application to a production environment.
6070

0 commit comments

Comments
 (0)