Replies: 3 comments 2 replies
-
|
Hello 👋 Not having too much feedback yet (just starting out building some stuff based on this, so I'll gladly provide some feedback soon(ish)). Mostly wanted to say - huge, huge, huge thank you for all the work. I've already built some internal stuff with RSC but it was mostly experimental due to how inconvenient it was to build with "raw" react-server-dom-webpack. Integrations like Parcel one is a game changer, but I love Vite so I wasn't fully satisfied haha. Can't thank enough on how much I appreciate the work here to make RSC more available to developers. The API and abstractions look really good at first glance and while I started playing it felt similarly to Parcel RSC integration. It's at the same time - pretty easy to start and if someone knows basics about RSC it feels similarly to just using plain Vite, and pretty powerful and allowing for e.g. building frameworks on top (what I'm a bit going to do 😄). One thing that I immediately see super useful, the switching to canary/experimental that you mentioned as not yet possible. Stuff like Also wondering - the thing that was discussed briefly at React PR - the Vite client-side manifest being sent with the entry - do you think it's something possible to overcome with current Vite architecture, or something not worth the hassle/not possible? While I don't think it's a huge pain - I'm mostly wondering about limitations/architecture and I a bit like the thing that Sebastian mentioned in your React PR (harder to find stuff that's not yet publicly available by malicious users). |
Beta Was this translation helpful? Give feedback.
-
|
Looks promising. Our goal is to keep all Waku capabilities while delegating vite related things to this package. |
Beta Was this translation helpful? Give feedback.
-
|
I've moved the plugin to https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-rsc and it's now published as |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Important
@hiogawa/vite-rscis now maintained as Vite's official package@vitejs/plugin-rsc. Please provide further feedback on the new repository.Please read https://github.com/hi-ogawa/vite-plugins/tree/main/packages/rsc for the documentation.
Goals
This package
@hiogawa/vite-rscexplores the desired RSC API surface on Vite. It starts as a plugin, but if we find features required at core level, then we will provide a feedback to Vite and implement it.Note for framework authors
I would appreciate any feedback, especially for following points:
builder.sharedPlugins: trueandbuilder.buildApp)react-server-domAPI and manifest integrationreact-server-domAPI usages than shown in./examples/starter/src/framework?import.meta.viteRsc.loadCsshelper)Regarding the issues of complicated "use client" usages inside
node_modules(as in https://github.com/hi-ogawa/rsc-tests), this is a known issue and I'm not seeking a complete solution at this point. However the simple case (such as"use client"written at the top of main package entry ofreact-server) is expected to work.Note on
react-server-dom-viteCurrently this package bundles
[email protected]and the downstream project can install only@hiogawa/vite-rsc(see also #968). The point is that I couldn't find a way to designreact-server-dom-viteso that it makes something not possible onreact-server-dom-webpackto be possible onreact-server-dom-viteand vice versa.However, bundling specific build of
react-server-domis not ideal as it prevents, for example, swapping dependencies withexperimentalchannel, so I will likely switch it to unbundle it at@hiogawa/vite-rsclevel #945.Through the (short) conversation on
react-server-dom-vitePR facebook/react#33152, I think React team seems generally welcoming whatever needed for Vite, but they don't of course have Vite-specific knowledge and don't provide particular technical insights for us. The expectation and responsibility on bundler/framework side are still to fully understandreact-server-domAPI surfaces on our own. Given this, for the time being I hold off trying to landreact-server-dom-vitein React repo. Instead, I'll publishreact-server-dom-vitefrom my fork (see #946) and iterate anything we need there without involving React team.Beta Was this translation helpful? Give feedback.
All reactions