| ms.service | azure-static-web-apps |
|---|---|
| ms.topic | include |
| ms.date | 10/15/2024 |
| author | cjk7989 |
| ms.author | jikunchen |
The following features of Static Web Apps are unsupported for Next.js with hybrid rendering:
- Select Azure services: Linked APIs using Azure Functions, Azure App Service, Azure Container Apps, or Azure API Management.
- SWA CLI features: SWA CLI local emulation and deployment.
- Partial features support: The following properties in
staticwebapp.config.jsonfile aren't supported:- Navigation fallback is unsupported.
- Route rewrites to routes within the Next.js application must be configured within
next.config.js. - The configuration within the
staticwebapp.config.jsonfile takes precedence over the configuration withinnext.config.js. - Configuration for the Next.js site should be handled using
next.config.jsfor full feature compatibility.
- Build skipping: For Next.js applications if
skip_api_build=true, Static Web Apps does not remove dev dependencies or add the sharp package by default. If you want these optimizations, add them to your custom build steps before passingskip_app_build=true. - Incremental static regeneration (ISR): Image caching isn't supported.
Note
The maximum app size for the hybrid Next.js application is 250 MB. Use standalone feature by Next.js for optimized app sizes. If this is not sufficient, consider using Static HTML exported Next.js if your app size requirement is more than 250 MB.