FormidableLabs/nextjs-serverless-demo

Experiment: Next.js via `serverless` target.

ryan-roemer opened this issue · 1 comments

  • Have a target: "serverless" build.
  • Bridge routing with next-aws-lambda or something similar to target one base Lambda
  • Assess package size
    • Check if there are duplicates across page bundles and see if we can tweak Next.js webpack config to split common chunks out.
  • Verify correctness.

Update

In https://github.com/FormidableLabs/nextjs-serverless-demo/tree/experiment/nextjs-serverless-mode we've got a very minimal POC up with:

  • No routing. Just shows the index page for any route match
  • No assets or anything. Just broken links.

... but it works in the following scenarios:

Package stats:

$ du -sh .serverless/blog.zip 
900K	.serverless/blog.zip
$ zipinfo .serverless/blog.zip | wc -l
      85

Next up, routing to different pages...