aws-amplify / amplify-hosting

AWS Amplify Hosting provides a Git-based workflow for deploying and hosting fullstack serverless web applications.
https://aws.amazon.com/amplify/hosting/
Apache License 2.0
458 stars 116 forks source link

Nuxt.js Server Side Rendering (SSR) support #1860

Closed siegerts closed 11 months ago

siegerts commented 3 years ago

Is your feature request related to a problem? Please describe. Given the current support for Next.js SSR, I'd like to have a similar option for Vue developers.

Describe the solution you'd like I'd like to deploy Nuxt.js SSR-enabled applications to Amplify Hosting.

Additional context

siegerts commented 3 years ago

If you're interested in this, please use reactions to 👍🏻 the post above!

image

sharaola commented 3 years ago

AWS is misleading in the documentation and giving wrong info

https://aws.amazon.com/about-aws/whats-new/2020/09/amplify-javascript-adds-server-side-rendering-support-frameworks-next-js-nuxt-js/

It is clearly mentiond that AWS Amplify supports NuxtJS with SSR

While AWS Professional support mentioned it is not supported and they even don't have ETA for this feature to be in place ???!!!!

wgins commented 3 years ago

+1 please!

JDHalm commented 3 years ago

yes please

bart commented 3 years ago

Is there any estimate when this feature is available? Like @sharaola said it's very misleading information in the corresponding blog post / announcement. As far as I can see AWS has to solve this issue by adding some special workflow when detecting a NuxtJS app during deployment, right? I think it's unfortunately not an open source issue the community can solve, correct?

DevRepublicGIT commented 3 years ago

+1 please

aspearman commented 3 years ago

Nuxt3 has moved into public beta, so perhaps the Amplify team can work on supporting Nuxt3. It'd be great to have SSR support by the time it's officially released 🤞🏻

ixartz commented 3 years ago

+1 especially with Next 3 released.

devravi commented 3 years ago

+1

bcs-gbl commented 3 years ago

+1

aavrug commented 2 years ago

+1 This will be really helpful when we don't have to handle anything manually except the push of the code so the deployment will be easy and scaling will be also handled automatically.

salv0 commented 2 years ago

Is there any news about this? :)

annymosse commented 2 years ago

So excited to try this feature 👍

StefanV85 commented 2 years ago

+1

bart commented 2 years ago

I might found a way to at least host a Nuxt 3 app via Lambda. Will further investigate and hopefully find a way to host it with Amplify, even it currently doesn't seem to be possible via Amplify Hosting. The creation of a custom Lambda function (in Amplify) might work based on my following solution. Last but not least I can't understand why it seems to be so difficult for the Amplify team to implement Nuxt 3 hosting feature. The community is waiting for ages now and other providers like Vercel are handling it with an awesome user experience instead. To be honest I'm very disappointed about what AWS is (or better is not) doing!

Here comes a possible workaround:

With Nuxt 3 running on Nitro you have the option to build it with deployment presets. It also has one for AWS Lambda called (yes, you guessed it): aws-lambda

  1. Run NITRO_PRESET=aws-lambda yarn build to generate a Lambda compatible version
  2. Zip content of your .output/server folder
  3. Create a new Lambda function (manually via AWS console) and activate function URL feature
  4. Upload your created ZIP file
  5. Click on the function URL displayed under your Lambda function ARN
  6. Et voila, your entire frontend app is server-side rendered on AWS including dynamic routes

Please let me know if you think this might be a temporary workaround to at least host Nuxt 3 apps serverless on AWS or if you have another solution. Cheers!

// Edit: Unfortunately it currently looks like CSS and other assets are not being loaded, even moved into the ZIP file from public directory. Will try to figure out why and keep you posted

bart commented 2 years ago

@Batto1300 This is not SSR. It's using the generate command which generates a static site. SSR means it is running a nodeJS instance in the background that handles requests and generates HTML on the server-side.

cweachock commented 2 years ago

any updates on this?? Would love to have!

scalemaildev commented 2 years ago

@bart @cweachock

Give this a look: https://github.com/nuxt/nuxt.js/issues/13478

And this repo: https://github.com/ffxsam/nuxt-sst

bart commented 2 years ago

Thanks for pointing this out @scalemaildev but unfortunately it doesn't solve the main issue: AWS still doesn't support AWS out of the box whereas other cloud service providers like Vercel do. That's an issue just AWS can solve and they promised it for months now. I accepted that they give a sh*t on Nuxt 3 community and switched to Vercel and Firebase / Supabase with most of my projects.

scalemaildev commented 2 years ago

Thanks for pointing this out @scalemaildev but unfortunately it doesn't solve the main issue: AWS still doesn't support AWS out of the box whereas other cloud service providers like Vercel do. That's an issue just AWS can solve and they promised it for months now. I accepted that they give a sh*t on Nuxt 3 community and switched to Vercel and Firebase / Supabase with most of my projects.

Of Vercel/Firebase/Supabase which would you recommend for someone that wants to run a Nuxt3 app "on the edge"? Specifically, a multiplayer game app with a lot of back and forth between client and server?

bart commented 2 years ago

@scalemaildev Depends a little on what your server exactly does. If it ist just handling requests and for example generates timestamps Vercel is fine. If you have data that needs to get stored into a database and if you have a more complex app ecosystem I would recommend Firebase which is closer to AWS.

salv0 commented 2 years ago

Will we ever see this implemented? 👀

bart commented 2 years ago

Unfortunately I don't think so. That's why I switched from Nuxt to Vitesse

dbhagen commented 1 year ago

@bart what's the benefit of switching to Vitesse? And vanilla Vitesse or Vitesse+Nuxt3? https://github.com/antfu/vitesse-nuxt3

bart commented 1 year ago

@dbhagen Main benefit for me is the release date delta between new major versions. It took more than 2 years to update NuxtJS to Vue 3. I don't wanna blame anyone for it because I know that a lot of braking changes took place (for example the new Composition API just to name one here). But in terms of issues we codes have to solve every day there are way more community solution out there for Vue 3 than for Nuxt for sure. Your choice should depend on the project you plan. If it is a single page app only, for sure Nuxt 3 might be the better choice. But if you need a little more freedom and a bigger community (Nuxt is just a piece of the Vue cake) then Vue 3 packed in Vitesse might be the better way to go.

pxslip commented 1 year ago

I'm curious if this feature is even being considered? The lack of Nuxt SSR support has brought a major project to a screeching halt as we had operated on the assumption (based on the original announcement) that Amplify would support SSR for Nuxt. Thanks!

robokozo commented 1 year ago

Just wanted to update the links in the OP with the latest references:

I'd love to hear if there was any movement on this request! Is it even being considered?

salv0 commented 1 year ago

It doesn't seem the Amplify team is really interested in supporting this... too bad

notherio commented 1 year ago

By the time this issue was open I was a young tough developer now I’m retired

kasvith commented 1 year ago

Do this please

trandaison commented 1 year ago

Any update, please

Joscha95 commented 1 year ago

+1

tompscanlan commented 1 year ago

Wait... so does SSR in Nuxt.js work on amplify at all? Do we require changes from AWS to get it working? Or can we make it work with special config?

2 years and a major rev in at least one of the projects tells me this ain't a priority for AWS.

devravi commented 1 year ago

Two years without any response. Disheartening. A simple acknowledgement would be appreciated.

bart commented 1 year ago

I recommend using Vercel to host your NuxtJS app. It's quite handy and you are not blocked by any AWS work that is required.

esorribas commented 1 year ago

@bart the problem is when you have 90% of services under AWS and you are comfortable on it and Vercel is expensive compared to AWS. I don't understand why is not supported, because I understand they can't support nitro, but come on, you can preset to nodejs and this is not a new technology.

siegerts commented 1 year ago

Hi All 👋,


I'm on the Amplify Hosting PM team. This is something that we are actively tracking. I appreciate all of the engagement here, in the Nuxt community, and all of the feedback provided over the course of the feature request.
I'm personally invested in this too... I opened this feature request :)



I'll maintain communication here with any updates. Thank you again!

bart commented 1 year ago

For more than two years now...

robokozo commented 1 year ago

@siegerts just a heads up that there are several different SSR frameworks using the https://nitro.unjs.io/ engine. You will get a lot of bang for your buck by supporting this story more directly.

Angular: https://analogjs.org/ SolidJS: https://github.com/solidjs/solid-start/discussions/1052 (announced at most recent vite conf)

There are more frameworks too: https://github.com/unjs/nitro/discussions/1015

You guys should hurry up :) because the firebase team is working on a similar SSR story https://firebase.google.com/docs/hosting/frameworks/frameworks-overview

sawravchy commented 1 year ago

Hi @siegerts , Do you have any approx. timeline for this? We have been waiting for this for a long time.

ppoturalskiEC commented 1 year ago

I'm curious if this feature is even being considered? The lack of Nuxt SSR support has brought a major project to a screeching halt as we had operated on the assumption (based on the original announcement) that Amplify would support SSR for Nuxt. Thanks!

Same here, any updates would be appreciated.

esorribas commented 11 months ago

https://twitter.com/AWSAmplify/status/1726635846483210561

🚀🚀🚀

Finally, thank you so much!!!!

siegerts commented 11 months ago

Hi All - I am excited to share that we now support Nuxt SSR (and other SSR deployments) on Amplify Hosting 🎉 . The Nuxt zero-config deployment was a combined effort between the Amplify and Nuxt team to integrate the new Amplify Hosting SSR deployment spec in the Nitro server.

For more information and a walkthrough of deploying a Nuxt app, check out:

Introducing Support for Hosting Any SSR app on AWS Amplify Hosting

github-actions[bot] commented 11 months ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.

github-actions[bot] commented 11 months ago

This issue has been automatically locked.