Nuxt.js: Introduce a serverless mode

Created on 12 Feb 2019  路  9Comments  路  Source: nuxt/nuxt.js

What problem does this feature solve?

Currently having Nuxt served via lambda is not an easy task. Especially to deploy with the awesome zeit.co/now platform it would be great if Nuxt could have a serverless mode similar to NextJS:
https://nextjs.org/blog/next-8/#serverless-nextjs

What does the proposed changes look like?

It would be great if a mode:'serverless' would get implemented and all defined routes will have the smallest footprint possible. Currently a NuxtJS bundle is too big and thus slow for cold boot startups

This feature request is available on Nuxt community (#c8644)
feature-request in progress

Most helpful comment

We've noticed the demand for that mode some time ago 鈽猴笍

All 9 comments

We've noticed the demand for that mode some time ago 鈽猴笍

@manniL is there anywhere some initial work already up and running? I tried several serverless/lambda approaches but for deploying to now v2 nothing succeeded so far

You know, whatever serverless solution that is being worked on also needs to take into account if the website has dynamic subdomain mechanism

e.g. login user can visit both aaa.test.com, bbb.test.com, etc. which is served from the same app :)

It is not just a simple matter of shoving it up to Lambda, you probably need to setup other services such as cloudfront, APIG, etc...

At the moment this would maybe a Solution: https://github.com/serverless/examples/tree/master/aws-node-vue-nuxt-ssr
didn't used it but looks promising.

@Clonk-HTML5 The repository is for nuxt 1.4.2, couldn't get it to run on 2.x.

@dohomi FYI: I wrote a guide on how to use v2 in universal mode with firebase cloud function

@williamchong007 nice write-up. I am using Now so I am using the official now builder: https://github.com/nuxt/now-builder

If someone still searching for this I created a guide explaning how to create a Nuxt application with Typescript + Koa + Serverless: https://github.com/EdisonHarada/nuxt-koa-serverless

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vadimsg picture vadimsg  路  3Comments

vadimsg picture vadimsg  路  3Comments

jaredreich picture jaredreich  路  3Comments

nassimbenkirane picture nassimbenkirane  路  3Comments

bimohxh picture bimohxh  路  3Comments