how to use vue-devtools in chrome extension options page
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 279
- PR merge metrics
- No merged PRs in 30d
Description
failed to load virtual js files from vue-devtools when running in chrome extension page.
how to specify injected js src with origin from dev server.
I am using wxt.dev to develop chrome extension, wxt.config.ts config like this,
// wxt.config.ts
import vueDevTools from 'vite-plugin-vue-devtools'
export default defineConfig({
plugins: [
vue(),
vueDevtools()
]
})
something i found after start npx wxt on my project,
//.output/chrome-mv3/options.html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<script type="module" src="/@id/virtual:vue-devtools-path:overlay.js"></script>
<script type="module" src="/@id/virtual:vue-inspector-path:load.js"></script>
....
as a result, request is failed
Request URL:
chrome-extension://amidodbgcdpbldlmccigekeemjhkkhlh/@id/virtual:vue-devtools-path:overlay.js
Referrer Policy:
strict-origin-when-cross-origin
it would be correct if the injected js src to be prepend with dev server, for example
<script type="module" src="http://localhost:3000/@id/virtual:vue-devtools-path:overlay.js"></script>
<script type="module" src="http://localhost:3000/@id/virtual:vue-inspector-path:load.js"></script>
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with wxt.config.ts and the generated .output/chrome-mv3/options.html, then trace how the virtual vue-devtools-path and vue-inspector-path script URLs are injected. Done means the options page loads those modules from the development server origin instead of requesting them under the chrome-extension:// URL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vite
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100