Skip to content

Conversation

@webfansplz
Copy link
Member

Description

Cache rpc response for Vite DevTools.

@netlify
Copy link

netlify bot commented Nov 11, 2025

Deploy Preview for vite-devtools ready!

Name Link
🔨 Latest commit d025a8a
🔍 Latest deploy log https://app.netlify.com/projects/vite-devtools/deploys/6918323bf0ab490008b423e8
😎 Deploy Preview https://deploy-preview-128--vite-devtools.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 11, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@vitejs/devtools@128
npm i https://pkg.pr.new/@vitejs/devtools-kit@128
npm i https://pkg.pr.new/@vitejs/devtools-rpc@128
npm i https://pkg.pr.new/@vitejs/devtools-vite@128

commit: d025a8a

@antfu
Copy link
Member

antfu commented Nov 11, 2025

We might want to do that inside getDevToolsRpcClient and also provide a API to invalidate the cache

@webfansplz
Copy link
Member Author

We might want to do that inside getDevToolsRpcClient and also provide a API to invalidate the cache

Done!

@webfansplz webfansplz marked this pull request as draft November 13, 2025 02:00
functions: string[]
}

// @TODO: should be moved to birpc-x?
Copy link
Member Author

@webfansplz webfansplz Nov 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to discussion.


const functions = await rpc.value.$call('vite:core:list-rpc-functions')

// TODO: add cacheable option to birpc-x and use it here
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO

@webfansplz
Copy link
Member Author

Hi @antfu, I have refactored it, and I will send a PR to birpc if this solution is ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants