[1]: https://nextjs.org/docs/advanced-features/react-18#react-ser...
It’s very similar to what Astro is doing. Only adding the JS if it’s actually necessary.
https://github.com/vercel/next-rsc-demo/tree/main/components
I would also like to make it understood that I'm not here to bash the Next project, I am simply interested in the technology.
[1]: https://github.com/josephsavona/rfcs/blob/server-components/...
* https://github.com/vercel/next.js/discussions/11552#discussi...
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).
$ tsc --strict --esModuleInterop --moduleResolution node --jsx react --outdir build server.ts node_modules/next/dist/server/config-shared.d.ts:1:15 - error TS2724: '"next/dist/compiled/webpack/webpack"' has no exported member named 'webpack5'. Did you mean 'webpack'?
1 import type { webpack5 } from 'next/dist/compiled/webpack/webpack'; ~~~~~~~~
Probably there's some workaround but the compile error seems legit. Is there something I can do about it until I figure out middleware?
> Underlying webpack improvements: We've made numerous improvements to webpack, including optimizing Fast Refresh and making on-demand entries more reliable.
> After making webpack 5 the default in Next.js 11, we've now officially removed webpack 4. We've worked closely with the community to ensure a smooth transition to webpack 5.
SWC is the equivalent of Babel for transpiling JS, not Webpack for bundling.
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!
Vercel doesn't have 4 regions, we have 17 :)
1) Do the .server files require any special infrastructure for self hosted solutions?
2) If we move to ISR to a component level, would that mean that a page with multiple components will generate a backend-process thrash of multiple refreshes? (say 10 components, each with a revalidate 1 s)
3) Is there a good mapping to translate ISR to server side components from both UX and infrastructure/implementation?
2. You can use the `keys` prop to prevent that (this is still very experimental and the API is not finalized).
3. We will be sharing more on this soon, but yeah still early days.
I understand that the Next philosophy is very monolithic but so far I’m having trouble getting it to play nice with build tooling.
You really think most of the build tooling will be written in other languages than JS? Compilers make sense, they are very CPU bound, but otherwise build tooling should also be accessible to modify to the developers working in the project, not just those who use Rust/Golang. And I'm sure we'll still use JS projects for some of the tooling.
Deno is using the same compiler (SWC) so there is data point number two on the question. esbuild is another...
Vercel just has first class support where everything just works, but can you host it yourself.