Live data from Hacker News

Next.js 12

nextjs.org

151–160 of 293 posts

Re: Next.js 12

#151

This is really amazing, is the end result here that they are ultimately opting out of webpack in favor of SWC? It also compiles modules and such. Will have to take a look at the underlying infrastructure here! Interestingly I think that’s the major win of SWC over esbuild: you get a Babel like plug-in ecosystem for AST transformations and such. Downside: there currently isn’t a way to run asynchronous transforms, muc…

I find that React + styled-components in the same file gives me almost entirely the same experience as SFC.

for >10x the javascript weight of Svelte tho :upside down smiley:

Re: Next.js 12

#152
post #143
post #138

Earlier quoted context omitted.

Current company's infrastructure is currently all on AWS, so using Step Functions. However I really _really_ like temporal.io's code-first solution (just didn't want to self-host). Perhaps the dust on best practices / tech for workflows or sagas just hasn't settled yet to include in a framework like the one I am envisioning. In general I think Supabase is fantastic in terms of the interoperability of all of the featu…

ah nice! make sure to fill out our waitlist if you want our managed service: https://temporal.io/cloud meanwhile if you like workflows as code and want to stay in the AWS world what about AWS SWF? our CEO used to be tech lead of that and it shares similar ideas. yeah we are hoping to establish what best practice/architecture for workflows looks like. Feedback/questions welcome: https://docs.temporal.io/blog/workflow-…

am an ex-AWS engineer who worked on a service team that depends on SWF and also on one that depends on Step Functions. IMO the serverless-ness (?) of Step Functions and not having to manage pollers like SWF is huge.

Re: Next.js 12

#153

I was hoping for hosted postgreSQL database support as part of Next deployment.

Vercel does come with a Supabase integration: https://vercel.com/integrations/supabase And from my limited understanding, Supabase is psql with extras.

Supabase developer here. Supabase gives you full PostgreSQL access as well as a REST api interface (Postgrest) with integrated authentication (based on GoTrue), S3-based storage also integrated to authentication and integrated with your PostgreSQL instance, an easy dashboard interface and a bunch more. There’s a generous free tier and a hosted option that’s ready to scale immediately. Let us know if you have any more questions.

Re: Next.js 12

#154
post #122

I'm going to be downvoted to hell for this... but the more I see the level of complexity and amount of engineering going into this, the more I miss Rails and how simple things are there, given most of us are just building CRUD apps anyways.

I keep thinking the same thing almost every day at work… “this is a CRUD app, who let it become this overly complex monster (multiple next apps)”. Then I remember why;

“Simplicity is a great virtue but it requires hard work to achieve it and education to appreciate it. And to make matters worse: complexity sells better.”

― Edsger Wybe Dijkstra

Re: Next.js 12

#155

This is really amazing, is the end result here that they are ultimately opting out of webpack in favor of SWC? It also compiles modules and such. Will have to take a look at the underlying infrastructure here! Interestingly I think that’s the major win of SWC over esbuild: you get a Babel like plug-in ecosystem for AST transformations and such. Downside: there currently isn’t a way to run asynchronous transforms, muc…

> I love Vue, but it’s forever married to the Babel parser

That's not true... I use Vue's SFC without Babel using vite.

Re: Next.js 12

#156
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.

How does middleware work when using a CDN to host the JS bundles?

ie what happens when I've already loaded the bundles and am transitioning to a page that has different middleware requirements?

Is it a client-only middleware implementation? (I want this and have implemented a poor man's version in my _app.tsx).

Re: Next.js 12

#157
post #88

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.

I think esbuild is a fantastic project as well as a huge inspiration. I'll share two quick thoughts[1] I have on SWC that made it a fantastic choice for Next.js : 1. SWC is designed for extensibility We were able to use `swc` as a crate[2], without the need to fork the project This allowed us to effectively (no divergence) and efficiently (no loss in performance) extend it, especially to add syntax and plugin compati…

But you could use vite/rollup/esbuild for bundling instead of Webpack and SWC for TS and other transforms.

Re: Next.js 12

#158
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...

I have a system that supports optimized images in SSG that doesn't rely on any third-party services. But it requires custom config (babel macro plugin), though it only works for the most trivial websites. Let's break it down why its hard. If you want responsive, optimized images in a SSG context, without any dependency on 3rd party services, your only option is to pre-generate images at build time. Fair enough, you c…

This argument doesn't really make sense.

> That means a whole lot of CPU that you need to burn during build

This doesn't makes it hard, and I'd rather spend the CPU once than at every edge server on first request.

> uses up loads of storage (that you need to ship to your static web server)

Uploading to S3 (for example) is free, and the edge servers need to store the images anyways (because they are slow to generate as you just mentioned).

> your 60 seconds deployment into a 30 minutes deployment (or longer), that doesn't scale.

Says who? It's a static site so it's not being updated every 30 minutes, and with some intelligent incremental compilation I bet it would remain fast even for the largest sites.

Re: Next.js 12

#159

This is really amazing, is the end result here that they are ultimately opting out of webpack in favor of SWC? It also compiles modules and such. Will have to take a look at the underlying infrastructure here! Interestingly I think that’s the major win of SWC over esbuild: you get a Babel like plug-in ecosystem for AST transformations and such. Downside: there currently isn’t a way to run asynchronous transforms, muc…

> you get a Babel like plug-in ecosystem for AST transformations and such

This is trivial to do with esbuild, for what it's worth.

Re: Next.js 12

#160

This is really amazing, is the end result here that they are ultimately opting out of webpack in favor of SWC? It also compiles modules and such. Will have to take a look at the underlying infrastructure here! Interestingly I think that’s the major win of SWC over esbuild: you get a Babel like plug-in ecosystem for AST transformations and such. Downside: there currently isn’t a way to run asynchronous transforms, muc…

How many extent build-systems are there now for JS/TS? It's getting insane.
Post reply on HN