Skip to content

fix: open editor without inspector global#1113

Draft
pupuking723 wants to merge 1 commit into
vuejs:mainfrom
pupuking723:fix/open-editor-without-inspector-global
Draft

fix: open editor without inspector global#1113
pupuking723 wants to merge 1 commit into
vuejs:mainfrom
pupuking723:fix/open-editor-without-inspector-global

Conversation

@pupuking723

Copy link
Copy Markdown

Fixes #824.

When the Vite plugin is detected, openInEditor() currently assumes window.__VUE_INSPECTOR__ has been registered. If the inspector runtime does not register that global, the "Open in Editor" action throws before it can reach the Vite open-in-editor middleware.

This keeps the existing inspector path when the global is available, and falls back to the same __open-in-editor?file=... request shape used by vite-plugin-vue-inspector when the global is missing.

Verification:

  • pnpm exec vitest run packages/devtools-kit/__tests__/core/open-in-editor.test.ts --config /private/tmp/vue-devtools-vitest.config.ts
  • pnpm exec eslint packages/devtools-kit/src/core/open-in-editor/index.ts packages/devtools-kit/__tests__/core/open-in-editor.test.ts
  • pnpm build:devtools-kit
  • git diff --check

I also tried pnpm type-check, but this checkout currently fails before reaching these files because packages/core/src/rpc/global.ts and packages/core/src/rpc/vite.ts cannot resolve hookable.

@netlify

netlify Bot commented Jul 21, 2026

Copy link
Copy Markdown

Deploy Preview for vue-devtools-docs canceled.

Name Link
🔨 Latest commit b3fcff4
🔍 Latest deploy log https://app.netlify.com/projects/vue-devtools-docs/deploys/6a5ee52ed5e2760008e8c479

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.

Open in Editor dosent work when Options API disabled

1 participant