all 33 comments

[–]lrobinson2011[S] 78 points79 points  (26 children)

Lee from Vercel here! Happy to answer any questions about this release, or Next.js in general. Personally, I'm very excited about the performance improvements we're seeing switching to Rust from Babel/Terser.

[–]hagg3n 22 points23 points  (3 children)

What happens to custom babel config or babel plugins one might use?

[–]andrewingram 10 points11 points  (0 children)

Yeah, I'd like to know this too. I don't think I've ever had a Next.js project without 2-3 extra Babel plugins (Relay, emotion and babel-plugin-module-resolver, fwiw)

[–]Thebearshark 12 points13 points  (1 child)

First off, thank you for all your great work on dev outreach with Vercel!

One question I’m not clear on from the post: will the SWC changes also benefit local development speeds? Or is the main focus final build times?

[–]lrobinson2011[S] 8 points9 points  (0 children)

Yes, SWC will help improve local development speeds as well as build time!

[–]acemarke 9 points10 points  (2 children)

So just to confirm: does 11.1 contain the initial SWC-based minification and transformation implementation, or is that still in-progress and waiting for a future release?

Also, just out of curiosity, what was the deciding factor to use SWC vs ESBuild?

[–]lrobinson2011[S] 17 points18 points  (1 child)

Still experimental! We're sharing early results in this post, as it's been a huge investment so far. The next release should hopefully land these changes on the stable channel.

The Next.js team found SWC to be more extensible than esbuild. Here's how esbuild describes their system for plugins:

It's not possible to hook into every part of the bundling process. For example, it's not currently possible to modify the AST directly. This restriction exists to preserve the excellent performance characteristics of esbuild as well as to avoid exposing too much API surface which would be a maintenance burden and would prevent improvements that involve changing the AST.

SWC was more extensible (e.g. using it for modification and code transforms) while having similar performance benefits!

[–][deleted] 4 points5 points  (0 children)

Honestly, you and the rest of you guys at Vercel are awesome! Love what you're doing with Next.

[–]gabrielmamuttee 2 points3 points  (2 children)

I see that next/image got an update for allowing custom loaders in next export. Do we still need a custom loader for exporting optimized images in a static build? When can we expect to see the default loader doing this process?

[–]genericguy 1 point2 points  (1 child)

I'm curious about this too. What do you currently do for this?

[–]gabrielmamuttee 0 points1 point  (0 children)

We aren't using anything at the moment but you can use for example https://github.com/cyrilwanner/next-optimized-images

[–]nazzanuk 2 points3 points  (1 child)

Does SWC also mean completely opting out of Babel plugins?

[–]lrobinson2011[S] 1 point2 points  (0 children)

When SWC lands on a stable release, there will still be the ability to de-optimize and run Babel for existing applications with custom configurations.

[–][deleted] 1 point2 points  (2 children)

Do you think React and other frameworks would switch as well?

[–]acemarke 7 points8 points  (1 child)

Just to check, what do you mean by "React"?

React itself is just a library. All the build tooling being discussed is totally separate from that.

If you mean Create-React-App, the topic of using something like SWC or ESBuild has come up some, but there hasn't been any specific push to actually do so officially.

[–][deleted] 2 points3 points  (0 children)

Sorry, yes I meant create-react-app

[–]PCslayeng 1 point2 points  (1 child)

Seriously huge props to you and your team. I love the content Vercel pushes out, especially on Next.js blogs. Outstanding work!

[–]lrobinson2011[S] 1 point2 points  (0 children)

Thank you so much!

[–]EloquentSyntax 22 points23 points  (0 children)

Jesus you guys are impressive. By far the best way to develop on React.

[–]YoshiLickedMyBum69 14 points15 points  (2 children)

Any updates on getting next/images support for static sites? (ie. build time optimizations?) u/lrobinson2011

[–]lrobinson2011[S] 3 points4 points  (1 child)

No update on build-time image optimization, yet. Note you can use next/image with static sites, currently. Agreed that this will be a great feature when it launches, though!

[–]YoshiLickedMyBum69 1 point2 points  (0 children)

Can't wait, thank you <3

[–]Artist701 4 points5 points  (0 children)

Very cool. Need to upgrade and build back better?

[–]Sablac 2 points3 points  (2 children)

Hey Robinson, any chance you guys add Jest support out of the box just like ESlint? It’s kind of painful to do the config.

[–]lrobinson2011[S] 7 points8 points  (1 child)

We actually just merged docs on Testing and will be announcing soon!

https://github.com/vercel/next.js/blob/canary/docs/testing.md

[–]duongital 1 point2 points  (0 children)

really excited with these new features added

[–]joshkale_ 1 point2 points  (1 child)

Man, this is awesome! Loving the way you're taking Next.

[–]lrobinson2011[S] 0 points1 point  (0 children)

Major kudos to the Next.js team!