's Avatar

@hiogawa.bsky.social

https://github.com/hi-ogawa @vitest.dev @vite.dev contributor

1,103 Followers  |  71 Following  |  50 Posts  |  Joined: 05.11.2024  |  1.811

Latest posts by hiogawa.bsky.social on Bluesky

Post image

Waku's Cloudflare example is also updated to use this approach, which now allows accessing bindings API during SSG github.com/wakujs/waku/...

06.11.2025 09:38 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

I created a package to expose `import "cloudflare:workers"` through Node custom loader and wrangler's `getPlatformProxy`.
Here is a React Router RSC framework mode example with Cloudflare KV github.com/hi-ogawa/vit....

05.11.2025 09:13 β€” πŸ‘ 5    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Waku now supports custom base. Here is an example of SSG site deployed to Github Pages hi-ogawa.github.io/waku-example...
`@vitejs/plugin-rsc` takes care of base path for handling static assets, so the required change on Waku was only application routing logic github.com/wakujs/waku/...

28.10.2025 00:43 β€” πŸ‘ 5    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

Nice! Thanks for pinging the team πŸ™

27.10.2025 23:47 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

My talk slides are available here hiroshi-talks.vercel.app/2025-10-25/1 also with source code in github.com/hi-ogawa/talks It was a great experience to talk with many awesome folks in person! Thanks @vuefes.bsky.social for the opportunity!

27.10.2025 09:18 β€” πŸ‘ 14    πŸ” 3    πŸ’¬ 0    πŸ“Œ 0

This is possible in principle though there's some limitations github.com/hi-ogawa/vit.... It turns out React Router RSC API allows overriding internal RSC requests without patching global `fetch`, Not so obvious demo, but here "server" component is accessing `window.navigator`. πŸ˜„

22.10.2025 10:14 β€” πŸ‘ 17    πŸ” 2    πŸ’¬ 1    πŸ“Œ 0

First time speaking at a conference!

18.10.2025 04:13 β€” πŸ‘ 21    πŸ” 2    πŸ’¬ 3    πŸ“Œ 0
Video thumbnail

Okay, here is my attempt with a fun demo! github.com/jacob-ebey/v...

17.10.2025 03:37 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

There's also an example / test case here github.com/vitejs/vite-... Though mine is quite a rough sketch, the important part is to use temporary references to achieve "donut pattern" (i.e. static shell + dynamic children). I've wanted Jacob to pick up this part in his library.

17.10.2025 01:01 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0
Preview
feat: add vue-router-ssr example with SSR assets API by hi-ogawa Β· Pull Request #5 Β· nitrojs/vite-examples Hey πŸ‘‹ This is very early prototype, but I wanted to share with you to get feedback. You can find a rough documentation in https://github.com/hi-ogawa/vite-plugins/tree/main/packages/fullstack. This...

`?assets` query import is just a virtual module and it's aimed to be runtime agnostic. You can find examples with `@cloudflare/vite-plugin` github.com/hi-ogawa/vit... and Nitro vite plugin github.com/nitrojs/vite...

15.10.2025 04:24 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image Post image

Also just right time, Remix 3 came out with a builtin concept of "hydrated component", so I ported Preact island demo. The plugin here implements `/islands/` and `/frames/` directories convention to auto wrap component by Remix `hydrated` and `Frame`. github.com/hi-ogawa/vit...

15.10.2025 04:24 β€” πŸ‘ 3    πŸ” 1    πŸ’¬ 1    πŸ“Œ 0
Post image

Here are examples for React router, Vue router, and Preact-based islands. These are super minimal examples, but eventually I'm hoping to be able to provide primitives for higher level meta-frameworks just like `@vitejs/pllugin-rsc` has provided foundation for Waku and React router.

15.10.2025 04:24 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
RFC: Client assets metadata API for SSR Β· vitejs vite Β· Discussion #20913 This proposal introduces a new API that enables server code to access client runtime assets metadata required for server-side rendering in a framework agnostic way. This feature is currently protot...

I wrote a proposal for improving client assets management on Vite SSR application by introducing `?assets` query import. It includes many examples to demonstrate how it can be used in various routers and frameworks setup. Feedback is appreciated! github.com/vitejs/vite/...

15.10.2025 04:24 β€” πŸ‘ 11    πŸ” 3    πŸ’¬ 1    πŸ“Œ 0
Preview
fix: `React.use` inside `React.lazy`-ed component on SSR by hi-ogawa Β· Pull Request #33941 Β· facebook/react Summary Closes Bug: React.use inside React.lazy-ed component returns other React.use value on SSRΒ #33937 As indicated by the previous issue comment #27731 (comment), it looks like legacy "th...

Here is a PR github.com/facebook/rea...

08.10.2025 09:19 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

I just realized my name is on React 19.2.0 release note. Due to client reference being lazy component, it was super tricky for Vite RSC and Waku (though we ended up finding a workaround). I'm glad I was able to land my first PR on React to fix this!

08.10.2025 09:19 β€” πŸ‘ 20    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

For this use of `"use server"` to work, the route needs to be `ServerComponent` route.

26.09.2025 06:18 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

Quick improvement to reduce potential confusion of "use server" on React Router RSC framework mode github.com/vitejs/vite-... Previously following "use server" is silently ignored, but this should be flagged as build error as React router inject `"use client"` for `export default` routes.

26.09.2025 06:18 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

Forgot to mention that this means it works with Waku too (and this is actually what I tested originally) github.com/hi-ogawa/wak...

25.09.2025 06:42 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
Nitro Vite Tracker Β· Issue #3461 Β· nitrojs/nitro πŸŽ‰ Nitro v3 is becoming "just" a Vite plugin! NoteYou can share feedback and ideas in πŸ’¬ Nitro Vite Feedback discusison. This issue is to track the development roadmap and related tasks. Initial PR (...

This nitro plugin is something I made based on how Tanstack Start integrates Nitro. Now I'm working on making the official Nitro Vite plugin to support RSC plugin out of the box. github.com/nitrojs/nitr... github.com/vitejs/vite-...

25.09.2025 03:26 β€” πŸ‘ 8    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0

I've been experimenting with Nitro and made a plugin for `@vitejs/plugin-rsc`-based app
to be deployed anywhere. Here is an example with React Router RSC! github.com/hi-ogawa/rea...

25.09.2025 03:26 β€” πŸ‘ 34    πŸ” 6    πŸ’¬ 1    πŸ“Œ 1
Post image

Read the updated documentation for more info! github.com/vitejs/vite-...
It's good to know Next.js clarifies this as a "framework feature" and not package's own behavior, which I obviously referenced it when adding the doc πŸ˜€ nextjs.org/docs/app/get...

17.09.2025 04:35 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

Improved the error message of invalid `server-only` and `client-only` imports on Vite RSC plugin! These "only" packages provide errors only during runtime on their own, but I didn't see any reason not to surface as build time error, so it has been included as a "plugin feature".

17.09.2025 04:35 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
fix(rsc): keep server stylesheet link for hmr and avoid injecting css via client js by hi-ogawa Β· Pull Request #841 Β· vitejs/vite-plugin-react Description Related Avoid duplicate css during dev due to server rendered <link> and client inline <style>Β #677 Closes Local font double flashes during devΒ #836 Closes chore(rsc): test...

Actually while testing this, I found a bug in rsc plugin, which was causing a weird font flash during dev, but it's now fixed in latest release github.com/vitejs/vite-.... The demo app is found in github.com/hi-ogawa/rep...

15.09.2025 06:20 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

Additionally, metric-based fallback font generation can be provided by just adding `fontaine` plugin github.com/unjs/fontaine/

15.09.2025 06:20 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

Not as fancy as `next/font`, but simple font optimization (self hosted font + preload link) is super easy thanks to fontsource fontsource.org/docs/getting...

15.09.2025 06:20 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

It may be possible to implement "use cache" like feature using `transformHoistInlineDirective`, which is exported from `@vitejs/plugin-rsc/transforms`. My minimal example is found here github.com/vitejs/vite-...

09.09.2025 09:15 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

RSC transform utility is available from `@vitejs/plugin-rsc/transforms` since v0.4.29 (just released). github.com/vitejs/vite-... This utility was initially in `@hiogawa/transforms` but moved inside `@vitejs/plugin-rsc` for easier maintenance, and then now it became usable standalone again πŸ˜€

09.09.2025 08:31 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image

For example, this is how it looks before and after the change on Waku website waku.gg More info in github.com/wakujs/waku/...

09.09.2025 08:17 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
feat(rsc): ability to merge client reference chunks based on server chunk usage by hi-ogawa Β· Pull Request #767 Β· vitejs/vite-plugin-react Description follow up to feat(rsc): ability to merge client reference chunksΒ #766 It should be already possible on user land, but this PR adds pass more metadata to clientChunks option to do it e...

Inspired by Parcel, `@vitejs/plugin-rsc` recently changed `"use client"` chunking strategy and it's now optimized based on how they are imported on server. This works nicely with route created by `import.meta.glob` since it merges client components based on page usages. github.com/vitejs/vite-...

09.09.2025 08:17 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Post image Post image

RSC support is now included in Vite documentation! vite.dev/plugins/#vit... It's mostly just a link to the plugin readme though. Any feedback on documentation is welcome! πŸ™‚

09.09.2025 03:52 β€” πŸ‘ 20    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

@hiogawa is following 20 prominent accounts