You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This should reduce the number of Lambda functions provisioned by the plugin. Next 9 prerenders static pages as HTML files, which means this plugin could simply upload these to S3 and route the page requests via API Gateway or CloudFront.
For the implementation, would this be be filtering out .html from getNextPagesFromBuildDir and then adding another accumulator to addCustomStackResources that scans the pages dir and generates api-gw-proxy for all the .html pages it finds? Would risk hittin the resource limit, but I think that's a risk already.
Motivation
Nextjs 9 introduced Automatic Static Optimisation as per this RFC.
What does this mean for this serverless plugin?
This should reduce the number of Lambda functions provisioned by the plugin. Next 9 prerenders static pages as HTML files, which means this plugin could simply upload these to S3 and route the page requests via API Gateway or CloudFront.
Proposal
Given the following app:
The above app produces the following built pages:
.next/serverless/pages/stars.js
.next/serverless/pages/about.html
The plugin will upload
about.html
to the assets bucket.Requests to
/about
will be routed to S3 the same way assets are currently served by the plugin.Requests to
/stars
would work as per current behaviour.The text was updated successfully, but these errors were encountered: