serverless-next.js icon indicating copy to clipboard operation
serverless-next.js copied to clipboard

Next.js 12

Open flippidippi opened this issue 2 years ago • 10 comments

Is your feature request related to a problem? Please describe. Next.js 12 support. Will middleware need to be addressed? https://nextjs.org/blog/next-12

Describe the solution you'd like Update serverless and CDK construct to work with Next.js 12

Describe alternatives you've considered Host in Fargate instead of Lambda 😄

Additional context N/A

flippidippi avatar Nov 05 '21 21:11 flippidippi

Thanks! Yes looks like the main features are AVIF image optimization support and middleware. Actually middleware is something I was thinking about (e.g for basic authentication which is added here manually) but looks like Next.js handles it already. Hope to look into it in the next weeks (although there are also some backlogged features (like redirects has support)), it's been hard to keep up with everything as the single maintainer.

dphang avatar Nov 07 '21 05:11 dphang

Thanks! Yes looks like the main features are AVIF image optimization support and middleware. Actually, middleware is something I was thinking about (e.g for basic authentication which is added here manually) but looks like Next.js handles it already. Hope to look into it in the next weeks (although there are also some backlogged features (like redirects has support)), it's been hard to keep up with everything as the single maintainer.

@dphang It's about 2 months whats the update on this?

saurabhguptarock avatar Jan 04 '22 17:01 saurabhguptarock

Would also be interested to run next js on fargate instead of lambda (for default and api) but still use the image lambda for image otpimization (s3 + cloudfront), mainly for the cold start problem. @dphang Is it still on the roadmap?

trompx avatar Feb 04 '22 15:02 trompx

Hi, in Next.js v12 we have an experimental outputStandalone option which copies all traced files and dependencies to a standalone folder and outputs a minimal server.js file to reduce deployment size and ease leveraging the new output file traces. Our Docker example leverages this as can be seen here.

Potentially this could make adding v12 support here easier as only the AWS wrapper should need to be added around the server.js file. Would love to hear any feedback on how we can make leveraging the traces we output easier!

ijjk avatar Feb 15 '22 01:02 ijjk

Any updates here? :) Any roadmap, high-level way forward so community could help on this?

sladg avatar Apr 19 '22 09:04 sladg

any updates? waiting for AVIF image optimization and middleware support 🙂

nikhil-shrestha avatar Apr 27 '22 03:04 nikhil-shrestha

Is there an expected due date for middleware support?

I'm sorry to say that I've decided to contact Vercel sales to check hosting alternatives because I don't see plans or even responses on many important issues here :(

elad-maimon avatar May 11 '22 10:05 elad-maimon

In the past weeks, I did some experimenting with standalone output and built out an MVP to use Next12 on Lambda. No need to use Edge functions. Middleware works as well (tested earlier today), maybe it will be helpful to some of you :) https://github.com/sladg/nextjs-lambda

sladg avatar Aug 29 '22 08:08 sladg

I am also interested in this. Any updates? Thanks

owboateng avatar Oct 31 '22 21:10 owboateng

Thanks! Yes looks like the main features are AVIF image optimization support and middleware. Actually middleware is something I was thinking about (e.g for basic authentication which is added here manually) but looks like Next.js handles it already. Hope to look into it in the next weeks (although there are also some backlogged features (like redirects has support)), it's been hard to keep up with everything as the single maintainer.

Hi mate! I'm just started to looking into your product. Are you available to somehow contatct and try to resolve all backlogged tasks to support Next 12 features and maybe event Next 13? I'm wery interested, even the Serverless Component style is deprecated, the features from 12 & 13 Next are highly requested. Please contact me via any avalable channel if you're still interested into this project. Best regards.

nike1v avatar Aug 04 '23 06:08 nike1v