@hiogawa.bsky.social

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

1,135 Followers 74 Following 53 Posts Joined Nov 2024
1 month ago
Github organization invitation with text "You've been invited to the Storybook organization!".

Excited to announce that I've officially joined @chromatic.com! My main focus will be working around features related to @vitest.dev 🀝

58 4 5 3
1 month ago

Thank you so much for sponsoring!

3 0 0 0
1 month ago
Preview
Release v3.0.1-alpha.2 Β· nitrojs/nitro πŸ”‹ This release contains many improvements since the alpha.1 release. ⏳ We took extra time to ensure everything works well by testing against real-world projects using Nitro v3. We are closer to Bet...

Nitro v3 alpha.2:

πŸ”₯ Rolldown optimized
πŸ“¦ Dependencies bundled by default
βš› React Server Components support (experimental)
πŸ”‹ Many more improvements

TIP: Upgrade to the latest nitro() plugin with vite@beta (rolldown) and enjoy a seriously mind-blowing performance boost πŸš€

62 9 2 0
1 month ago
Preview
feat(rsc): use `__VITE_ENVIRONMENT_RUNNER_IMPORT__` for `import.meta.viteRsc.loadModule` global by hi-ogawa Β· Pull Request #1037 Β· vitejs/vite-plugin-react Description Establishes __VITE_ENVIRONMENT_RUNNER_IMPORT__ as a convention for frameworks to integrate custom environment setups with import.meta.viteRsc.loadModule. declare global { function __V...

Here is an PR that introduced `__VITE_ENVIRONMENT_RUNNER_IMPORT__` convention github.com/vitejs/vite-...

3 0 0 0
1 month ago
GitHub - hi-ogawa/vite-rsc-runtime-integration-examples Contribute to hi-ogawa/vite-rsc-runtime-integration-examples development by creating an account on GitHub.

I put together Vite RSC example repo with Cloudflare and Nitro plugins. This includes React Router framework mode templates with both plugins. Thanks to Cloudflare and Nitro teams for the collaboration to establish `__VITE_ENVIRONMENT_RUNNER_IMPORT__` convention!

6 0 1 0
3 months ago
Two istanbul coverage reports side-by-side. Left one titled "vite@7 + esbuild", right one "vite@8-beta + rolldown + oxc". Report on the right demonstrates how ignore hints work without @preserve keyword.

When using vite@8-beta with Vitest users no longer need to add magical '@preserve' keywords in their coverage ignore hints. Originally this work-around was needed due to esbuild's (intentional) lack of support for comment preserving. Oxc has built-in support for JS coverage tools' ignore hints.

16 2 0 1
3 months ago
Post image Post image

Vitest 4.0.15 comes with a cool experimental feature: Imports Breakdown. Every module shows how long it took to load in UI and in the VSCode extension!

Pass down `--experimental.printImportBreakdown` to also see it in your terminal.

vitest.dev/guide/ui.htm...

42 8 5 1
3 months ago
A screenshot of Vitest terminal showing the times for two runs. The first run takes 9.65s, the second run takes 5.90s.

Vitest 4.0.11 adds an experimental `fsModuleCache` flag to cache module transforms between reruns. Learn more: vitest.dev/config/exper...

This is an opt-in feature, please let us know how it works for you!

And example of a single test file that imports a lot of files (~1500). Almost a 50% boost!

55 10 4 0
4 months ago
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/...

3 0 1 0
4 months ago
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....

6 0 1 0
4 months ago

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/...

5 1 0 0
4 months ago

Nice! Thanks for pinging the team πŸ™

2 0 1 0
4 months ago

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!

14 3 0 0
4 months ago

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`. πŸ˜„

17 2 1 0
4 months ago

First time speaking at a conference!

21 2 3 0
4 months ago
Video thumbnail

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

3 0 1 0
4 months ago

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.

2 0 2 0
5 months ago
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...

1 0 0 0
5 months ago
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...

3 1 1 0
5 months ago
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.

2 0 1 0
5 months ago
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/...

11 3 1 0
5 months ago
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...

3 0 0 0
5 months ago
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!

20 0 1 0
5 months ago
Post image

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

1 0 1 0
5 months ago
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.

1 0 1 0
5 months ago
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...

0 0 0 0
5 months ago
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-...

8 0 2 0
5 months ago

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

34 6 1 1
5 months ago
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...

0 0 0 0
5 months ago
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".

3 0 1 0