Skip to content

Conversation

hi-ogawa
Copy link
Contributor

@hi-ogawa hi-ogawa commented Aug 4, 2025

Description

This is like a more hacky territory, but I think this use case is worth saving to reduce minor paper cut as much as possible.


Actually we might not need to vendor as a copy, but simply optimizing @vitejs/plugin-rsc > use-sync-external-store/**/* might be enough since Vite cannot differentiate where the dep comes from.

@hi-ogawa hi-ogawa added the trigger: preview Trigger pkg.pr.new label Aug 4, 2025
Copy link

pkg-pr-new bot commented Aug 4, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@vitejs/plugin-react@674
npm i https://pkg.pr.new/@vitejs/plugin-react-oxc@674
npm i https://pkg.pr.new/@vitejs/plugin-rsc@674
npm i https://pkg.pr.new/@vitejs/plugin-react-swc@674

commit: 60d3632

@hi-ogawa hi-ogawa changed the title fix(rsc): vendor and optimize use-sync-external-store fix(rsc): optimize use-sync-external-store Aug 4, 2025
@hi-ogawa hi-ogawa merged commit 556de15 into main Aug 5, 2025
20 of 21 checks passed
@hi-ogawa hi-ogawa deleted the 08-04-fix_rsc_vendor_and_optimize_use-sync-external-store_ branch August 5, 2025 01:32
dai-shi pushed a commit to wakujs/waku that referenced this pull request Aug 6, 2025
- Using vitejs/vite-plugin-react#674

I'm thinking to add a slight hack on plugin side to support
`use-sync-external-store` out-of-the-box, which tends to be smuggled
within deep dependency tree and causes a cryptic error. After this
change, `e2e/fixtures/ssr-swr/waku.config.ts` can be removed.

I thought this would just work without change on Waku, but it failed
because it matches `@vitejs/plugin-rsc/` instead of
`@vitejs/plugin-rsc`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

trigger: preview Trigger pkg.pr.new

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant