Live data from Hacker News

Next.js 12

nextjs.org

51–60 of 293 posts

Re: Next.js 12

#51
post #18

I don't get it. It's still not possible to use next/image (without some fancy loader or 3rd party service) when exporting a SSG build. Are people really not using responsive images when exporting a static site? Seems quite ridiculous to rely on some 3rd party service for image optimization when the images could be generated locally when exporting the site...

Just use Gatsby v4 if you want good image support! v4 brings Gatsby in-line with Next.js because it introduced runtime SSR support like Next.

Re: Next.js 12

#52
post #41

Earlier quoted context omitted.

> Zero-config would be that those middlewares are enabled by default What middlewares? Next has all basic middlewares needed enabled by default. What you're suggesting is that Next ships with every possible middleware that anyone could need, even the special snowflake middleware I want that adds a "foozlebozzle" property to the request context, just to say "We don't require you to do anything" and that's just not pos…

Yes, it is a good thing but I do not see how it is zero config (and generally I do not think zero config is a good thing). Selecting your set of middleware is config.

The zero-config aspect is that in order to add my own middleware to my app, I drop in a file with my middleware function into a directory and that's it. There is nothing else I have to do. Just like if I want to define a new API endpoint, I drop in a file in the corresponding directory with the endpoint function defined and that's it. That's zero config.

They took all the ease of the old PHP approach and made it better.

Re: Next.js 12

#53
post #48

If Next.js + Vercel is the leader of the production-ready frontend-as-a-service space, why hasn't a similar leader emerged in the backend-as-a-service space? I would love a clean Vercel-like abstraction on top of standard cloud primitives (functions, queues, events, workflows, etc.) with everything wired up nicely and focused on developer experience. It just seems like AWS is so configuration heavy that it is ripe fo…

Vercel / Next.js does function as a backend, too. You simply add an api folder and create 'routeName.js' files in there and you've got an endpoint backed by a lambda.

And Vercel itself allows you to install backend services such as Redis caching, databases, or queues that you can pull in from those functions.

Re: Next.js 12

#54
>Compilation using Rust is 17x faster than Babel and enabled by default using Next.js 12, replacing transforming JavaScript and TypeScript files.

I've never, ever felt constrained by Babel performance. Even in massive 100k+ LOC codebases. I have, however, been burned over and over again by introducing native binaries into the build process. We specifically moved off of node-sass to using PostCSS for this very reason.

I'm not completely sure how these Rust binaries will work, but if they are in any way less universal than Node, it's going to cause problems across dev and CI build environments.

Re: Next.js 12

#55

Earlier quoted context omitted.

How does it compare to esbuild? Seems they both want to achieve exactly the same thing, but somehow it's two different efforts.

They are two different efforts, started a little while ago, one in Go and one in Rust. I believe esbuild was started first, but they both seem to be maturing rather well lately.

> I believe esbuild was started first

That seems incorrect.

- "put on github" - evanw committed on Jan 15, 2020 - https://github.com/evanw/esbuild/commit/23c40b1b6a76a8626f1d...

- "initial commit" - kdy1 committed on Dec 22, 2017 - https://github.com/swc-project/swc/commit/0f9532dd5d379292cc...

Re: Next.js 12

#56
post #48

If Next.js + Vercel is the leader of the production-ready frontend-as-a-service space, why hasn't a similar leader emerged in the backend-as-a-service space? I would love a clean Vercel-like abstraction on top of standard cloud primitives (functions, queues, events, workflows, etc.) with everything wired up nicely and focused on developer experience. It just seems like AWS is so configuration heavy that it is ripe fo…

Supabase is headed in that direction and already works for most simple CRUD like apps.

Re: Next.js 12

#58
This is nice as a more opinionated version of create-react-app. helps solve some of the problem with the fragmented react ecosystem.

It does seem a bit complex though, perhaps something you would use on large projects only.

Re: Next.js 12

#59
post #2

Hey everyone, Lee from Vercel here! Happy to answer any questions about Next.js 12. Personally, I'm extremely excited for the new Rust compiler.

Hey Lee! Loved the new features and your session on edge.

One further-future question - would react server components ever be able to execute on the edge or will those always run from the datacenter you've deployed to?

And regions - Cloudflare Workers offers 44 regions in North America and Vercel currently offers 4. Does your team have any plans to add some more edges around the world to bring the speed benefits closer to end users?

Thanks to you and your teams incredible hard work on all the new features. Next.js has been a blast to use the past 5 years. Looking forward to the next 5!

Re: Next.js 12

#60
post #48

If Next.js + Vercel is the leader of the production-ready frontend-as-a-service space, why hasn't a similar leader emerged in the backend-as-a-service space? I would love a clean Vercel-like abstraction on top of standard cloud primitives (functions, queues, events, workflows, etc.) with everything wired up nicely and focused on developer experience. It just seems like AWS is so configuration heavy that it is ripe fo…

Vercel / Next.js does function as a backend, too. You simply add an api folder and create 'routeName.js' files in there and you've got an endpoint backed by a lambda. And Vercel itself allows you to install backend services such as Redis caching, databases, or queues that you can pull in from those functions.

Definitely get that it works as a backend as well. I guess I am imagining a frontend-agnostic platform that is more backend-centric, rather than targeted directly for frontend web development.

Ideally I just get an endpoint from my backend-as-a-service (Supabase style) I can pop into Vercel as an environment variable, and use it as well in my moblile apps, public api, etc.

Post reply on HN